3 ms·
See also: git log -L:funcname:file funcname will be matched after wrapping it in a "function declaration identifying" regexp. Get the entire history of a
by PaulDavisThe1st 2y ago
See also:
git log -L:funcname:file
funcname will be matched after wrapping it in a "function declaration identifying" regexp.
Get the entire history of a given function (as long as it was in <file>). Not a daily driver, but sometimes unimaginably valuable.
- ufo 2y agoCould you please give a concrete example of how to use funcname? I tried looking in the man page and didn't get it.
- deleted 2y ago[deleted]
- PaulDavisThe1st 2y agoI work in C++, so I might be looking for the history of Session::set_state (XMLNode const & node) I would write: git log -L:set_state:session_state.cc If I worked in C, and I had this in a file: void some_function_name (type1_t t1, type2_t t2) I would write git log -L:some_function_name:thefile.cc
- lucasoshiro 2y agoThanks! I'll check it and I'll update my article with that!