]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: point to diff attribute in patch format docs
authorPeter Oliver <git@mavit.org.uk>
Tue, 27 Apr 2021 11:02:57 +0000 (11:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 04:34:44 +0000 (13:34 +0900)
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>
Documentation/diff-generate-patch.txt

index 2db8eacc3ec74ba13bd6652867bcee99abf6f31b..c78063d4f74a30dc58c98a7af5db7fcdeeab69f3 100644 (file)
@@ -11,7 +11,7 @@ linkgit:git-diff-files[1]
 with the `-p` option produces patch text.
 You can customize the creation of patch text via the
 `GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables
-(see linkgit:git[1]).
+(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).
 
 What the -p option produces is slightly different from the traditional
 diff format:
@@ -74,6 +74,11 @@ separate lines indicate the old and the new mode.
       rename from b
       rename to a
 
+5.  Hunk headers mention the name of the function to which the hunk
+    applies.  See "Defining a custom hunk-header" in
+    linkgit:gitattributes[5] for details of how to tailor to this to
+    specific languages.
+
 
 Combined diff format
 --------------------