Skip to content

Commit e0adb84

Browse files
meonkeysgitster
authored andcommitted
diff format documentation: clarify --cc and -c
The description was unclear if -c or --cc was the default (--cc is for some commands), and incorrectly implied that the default applies to all the diff generating commands. Most importantly, "log" does not default to "--cc" (it defaults to "--no-merges") and "log -p" obeys the user's wish to see non-combined format. Only "diff" (during merge and three-blob comparison) and "show" use --cc as the default. Signed-off-by: Adam Monsen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 841d811 commit e0adb84

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/diff-generate-patch.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,13 @@ separate lines indicate the old and the new mode.
7474
combined diff format
7575
--------------------
7676

77-
"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
78-
'--cc' option to produce 'combined diff'. For showing a merge commit
79-
with "git log -p", this is the default format; you can force showing
80-
full diff with the '-m' option.
77+
Any diff-generating command can take the `-c` or `--cc` option to
78+
produce a 'combined diff' when showing a merge. This is the default
79+
format when showing merges with linkgit:git-diff[1] or
80+
linkgit:git-show[1]. Note also that you can give the `-m' option to any
81+
of these commands to force generation of diffs with individual parents
82+
of a merge.
83+
8184
A 'combined diff' format looks like this:
8285

8386
------------

0 commit comments

Comments
 (0)