Skip to content

Commit 3b559ea

Browse files
jnarebJunio C Hamano
authored andcommitted
diff format documentation: describe raw combined diff format
Add description of raw combined diff format to diff-formats.txt, as "diff format for merges" section, before "Generating patches..." section. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 71f4b18 commit 3b559ea

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Documentation/diff-format.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,28 @@ When `-z` option is not used, TAB, LF, and backslash characters
5959
in pathnames are represented as `\t`, `\n`, and `\\`,
6060
respectively.
6161

62+
diff format for merges
63+
----------------------
64+
65+
"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
66+
to generate diff output also for merge commits. The output differs
67+
from the format described above in the following way:
68+
69+
. there is a colon for each parent
70+
. there are more "src" modes and "src" sha1
71+
. status is concatenated status characters for each parent
72+
. no optional "score" number
73+
. single path, only for "dst"
74+
75+
Example:
76+
77+
------------------------------------------------
78+
::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c
79+
------------------------------------------------
80+
81+
Note that 'combined diff' lists only files which were modified from
82+
all parents.
83+
6284

6385
Generating patches with -p
6486
--------------------------

0 commit comments

Comments
 (0)