git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Peter Oliver via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Peter Oliver <p.d.oliver@mavit.org.uk>,
	Peter Oliver <git@mavit.org.uk>, Peter Oliver <git@mavit.org.uk>
Subject: [PATCH v2] doc: point to diff attribute in patch format docs
Date: Tue, 27 Apr 2021 11:02:57 +0000	[thread overview]
Message-ID: <pull.940.v2.git.1619521378282.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.940.git.1619463549689.gitgitgadget@gmail.com>

From: Peter Oliver <git@mavit.org.uk>

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>
---
    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.
    
    v2: Mention the specific relevant section of the gitattributes manual.
    Thanks to Junio C Hamano for the suggestion.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-940%2Fmavit%2Fdiff-gitattributes-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-940/mavit/diff-gitattributes-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/940

Range-diff vs v1:

 1:  6f87f3962b84 ! 1:  191d81ef61a5 doc: point to diff attribute in patch format docs
     @@ Documentation/diff-generate-patch.txt: separate lines indicate the old and the n
             rename to a
       
      +5.  Hunk headers mention the name of the function to which the hunk
     -+    applies.  See linkgit:gitattributes[5] for details of how to tailor
     -+    to this to specific languages.
     ++    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


 Documentation/diff-generate-patch.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index 2db8eacc3ec7..c78063d4f74a 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -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
 --------------------

base-commit: 311531c9de557d25ac087c1637818bd2aad6eb3a
-- 
gitgitgadget

      parent reply	other threads:[~2021-04-27 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 18:59 [PATCH] doc: point to diff attribute in patch format docs Peter Oliver via GitGitGadget
2021-04-27  7:40 ` Junio C Hamano
2021-04-27 10:37   ` Peter Oliver
2021-04-27 11:02 ` Peter Oliver via GitGitGadget [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.940.v2.git.1619521378282.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@mavit.org.uk \
    --cc=git@vger.kernel.org \
    --cc=p.d.oliver@mavit.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).