50

The git-log documentation explains the parameter --full-diff.

In detail:

Without this flag, git log -p ... shows commits that touch the specified paths, and diffs about the same specified paths. With this, the full diff is shown for commits that touch the specified paths; this means that "…​" limits only commits, and doesn’t limit diff for those commits.

Note that this affects all diff-based output types, e.g. those produced by --stat, etc.

I've no idea what it tries to explain, can someone give me an example maybe.

1 Answer 1

60

Sure. Let's say you have a commit C that makes changes to file A and file B.

Regular git log -p -- A will show all commits that touch file A, and for those commits, it'll show the diffs to A. With --full-diff, it'll show the same commits, but for each commit it'll show the diff of all files changed in that commit. In this case, commit C's diff will show diffs for files A and B.

Not the answer you're looking for? Browse other questions tagged or ask your own question.