1- Generating patches with -p
2- --------------------------
3-
4- When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
5- with a `-p` option, "git diff" without the `--raw` option, or
6- "git log" with the "-p" option, they
7- do not produce the output described above; instead they produce a
8- patch file. You can customize the creation of such patches via the
1+ Generating patch text with -p
2+ -----------------------------
3+
4+ Running
5+ linkgit:git-diff[1],
6+ linkgit:git-log[1],
7+ linkgit:git-show[1],
8+ linkgit:git-diff-index[1],
9+ linkgit:git-diff-tree[1], or
10+ linkgit:git-diff-files[1]
11+ with the `-p` option produces patch text.
12+ You can customize the creation of patch text via the
913`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables.
1014
1115What the -p option produces is slightly different from the traditional
@@ -49,7 +53,7 @@ similarity index value of 100% is thus reserved for two equal
4953files, while 100% dissimilarity means that no line from the old
5054file made it into the new one.
5155+
52- The index line includes the SHA-1 checksum before and after the change.
56+ The index line includes the blob object names before and after the change.
5357The <mode> is included if the file mode does not change; otherwise,
5458separate lines indicate the old and the new mode.
5559
@@ -70,7 +74,7 @@ separate lines indicate the old and the new mode.
7074 rename to a
7175
7276
73- combined diff format
77+ Combined diff format
7478--------------------
7579
7680Any diff-generating command can take the `-c` or `--cc` option to
@@ -80,7 +84,7 @@ linkgit:git-show[1]. Note also that you can give the `-m` option to any
8084of these commands to force generation of diffs with individual parents
8185of a merge.
8286
83- A ' combined diff' format looks like this:
87+ A " combined diff" format looks like this:
8488
8589------------
8690diff --combined describe.c
@@ -113,11 +117,11 @@ index fabadb8,cc95eb0..4866510
113117------------
114118
1151191. It is preceded with a "git diff" header, that looks like
116- this (when `-c` option is used):
120+ this (when the `-c` option is used):
117121
118122 diff --combined file
119123+
120- or like this (when `--cc` option is used):
124+ or like this (when the `--cc` option is used):
121125
122126 diff --cc file
123127
@@ -160,7 +164,7 @@ parents.
1601644. Chunk header format is modified to prevent people from
161165 accidentally feeding it to `patch -p1`. Combined diff format
162166 was created for review of merge commit changes, and was not
163- meant for apply . The change is similar to the change in the
167+ meant to be applied . The change is similar to the change in the
164168 extended 'index' header:
165169
166170 @@@ <from-file-range> <from-file-range> <to-file-range> @@@
0 commit comments