Skip to content

Commit 7a14acd

Browse files
mavitgitster
authored andcommitted
doc: point to diff attribute in patch format docs
From the documentation for generating patch text with diff-related commands, refer to the documentation for the diff attribute. This attribute influences the way that patches are generated, but this was previously not mentioned in e.g., the git-diff manpage. Signed-off-by: Peter Oliver <git@mavit.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 48bf2fa commit 7a14acd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Documentation/diff-generate-patch.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ linkgit:git-diff-files[1]
1111
with the `-p` option produces patch text.
1212
You can customize the creation of patch text via the
1313
`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables
14-
(see linkgit:git[1]).
14+
(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).
1515

1616
What the -p option produces is slightly different from the traditional
1717
diff format:
@@ -74,6 +74,11 @@ separate lines indicate the old and the new mode.
7474
rename from b
7575
rename to a
7676

77+
5. Hunk headers mention the name of the function to which the hunk
78+
applies. See "Defining a custom hunk-header" in
79+
linkgit:gitattributes[5] for details of how to tailor to this to
80+
specific languages.
81+
7782

7883
Combined diff format
7984
--------------------

0 commit comments

Comments
 (0)