@@ -14,7 +14,7 @@ You can customize the creation of patch text via the
14
14
`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables
15
15
(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).
16
16
17
- What the -p option produces is slightly different from the traditional
17
+ What the `-p` option produces is slightly different from the traditional
18
18
diff format:
19
19
20
20
1. It is preceded by a "git diff" header that looks like this:
@@ -30,20 +30,21 @@ name of the source file of the rename/copy and the name of
30
30
the file that the rename/copy produces, respectively.
31
31
32
32
2. It is followed by one or more extended header lines:
33
-
34
- old mode <mode>
35
- new mode <mode>
36
- deleted file mode <mode>
37
- new file mode <mode>
38
- copy from <path>
39
- copy to <path>
40
- rename from <path>
41
- rename to <path>
42
- similarity index <number>
43
- dissimilarity index <number>
44
- index <hash>..<hash> <mode>
45
33
+
46
- File modes are printed as 6-digit octal numbers including the file type
34
+ [synopsis]
35
+ old mode <mode>
36
+ new mode <mode>
37
+ deleted file mode <mode>
38
+ new file mode <mode>
39
+ copy from <path>
40
+ copy to <path>
41
+ rename from <path>
42
+ rename to <path>
43
+ similarity index <number>
44
+ dissimilarity index <number>
45
+ index <hash>..<hash> <mode>
46
+ +
47
+ File modes _<mode>_ are printed as 6-digit octal numbers including the file type
47
48
and file permission bits.
48
49
+
49
50
Path names in extended headers do not include the `a/` and `b/` prefixes.
@@ -56,7 +57,7 @@ files, while 100% dissimilarity means that no line from the old
56
57
file made it into the new one.
57
58
+
58
59
The index line includes the blob object names before and after the change.
59
- The <mode> is included if the file mode does not change; otherwise,
60
+ The _ <mode>_ is included if the file mode does not change; otherwise,
60
61
separate lines indicate the old and the new mode.
61
62
62
63
3. Pathnames with "unusual" characters are quoted as explained for
@@ -134,17 +135,18 @@ or like this (when the `--cc` option is used):
134
135
135
136
2. It is followed by one or more extended header lines
136
137
(this example shows a merge with two parents):
137
-
138
- index <hash>,<hash>..<hash>
139
- mode <mode>,<mode>..<mode>
140
- new file mode <mode>
141
- deleted file mode <mode>,<mode>
138
+ +
139
+ [synopsis]
140
+ index <hash>,<hash>..<hash>
141
+ mode <mode>,<mode>`..`<mode>
142
+ new file mode <mode>
143
+ deleted file mode <mode>,<mode>
142
144
+
143
145
The `mode <mode>,<mode>..<mode>` line appears only if at least one of
144
146
the <mode> is different from the rest. Extended headers with
145
147
information about detected content movement (renames and
146
148
copying detection) are designed to work with the diff of two
147
- <tree-ish> and are not used by combined diff format.
149
+ _ <tree-ish>_ and are not used by combined diff format.
148
150
149
151
3. It is followed by a two-line from-file/to-file header:
150
152
0 commit comments