git log --no-merges -p --function-context
works just fine with my git 1.8.5 (msysgit on Windows).
This isn't surprising considering that the git log
man page does mention:
The command takes options applicable to the
git rev-list
command to control what is shown and how, and options applicable to thegit diff-*
commands to control how the changes each commit introduces are shown.
Check the version of your Git: it is possible it doesn't support that argument yet.
That --function-context
was introduced with commit 14937c2, by René Scharfe, for git 1.7.8 (December 2011).
Add the option
-W/--function-context
to git diff.
It is similar to the same option ofgit grep
and expands the context of change hunks so that the whole surrounding function is shown.
This "natural" context can allow changes to be understood better.