git log -L:function_name:file_name
can be used to get the log of all commits that touched a specific function. But it always shows the content/diff of the commit as if -p
option was applied.
I have tried to several different options to the command like --oneline
, --abbrev-commit
, -U0
but they just remove a few lines and still print a lot of commit content.
How can I get a one-line summary?
As indicated in the doc, only --no-patch
achieves what you want. Other diff format options are disabled with -L
Implies
--patch
. Patch output can be suppressed using--no-patch
, but other diff formats (namely--raw
,--numstat
,--shortstat
,--dirstat
,--summary
,--name-only
,--name-status
,--check
) are not currently implemented.