{"thread":{"id":"55564","subject":"[PATCH] doc: point to diff attribute in patch format docs","startedAt":"2021-04-26T19:00:47Z","lastAt":"2021-04-27T11:03:03Z","messageCount":4,"participants":["Peter Oliver via GitGitGadget","Junio C Hamano","Peter Oliver"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"423027","messageId":"pull.940.git.1619463549689.gitgitgadget@gmail.com","threadId":"55564","inReplyTo":null,"subject":"[PATCH] doc: point to diff attribute in patch format docs","fromName":"Peter Oliver via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-04-26T18:59:09Z","receivedAt":"2021-04-26T19:00:47Z","isPatch":true,"sender":{"key":"p.d.oliver@mavit.org.uk","avatar":null},"body":"From: Peter Oliver <git@mavit.org.uk>\n\nFrom the documentation for generating patch text with diff-related\ncommands, refer to the documentation for the diff attribute.\n\nThis attribute influences the way that patches are generated, but this\nwas previously not mentioned in e.g., the git-diff manpage.\n\nSigned-off-by: Peter Oliver <git@mavit.org.uk>\n---\n    doc: point to diff attribute in patch format docs\n    \n    From the documentation for generating patch text with diff-related\n    commands, refer to the documentation for the diff attribute.\n    \n    This attribute influences the way that patches are generated, but this\n    was previously not mentioned in e.g., the git-diff manpage.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-940%2Fmavit%2Fdiff-gitattributes-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-940/mavit/diff-gitattributes-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/940\n\n Documentation/diff-generate-patch.txt | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\nindex 2db8eacc3ec7..ec506155fc74 100644\n--- a/Documentation/diff-generate-patch.txt\n+++ b/Documentation/diff-generate-patch.txt\n@@ -11,7 +11,7 @@ linkgit:git-diff-files[1]\n with the `-p` option produces patch text.\n You can customize the creation of patch text via the\n `GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables\n-(see linkgit:git[1]).\n+(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).\n \n What the -p option produces is slightly different from the traditional\n diff format:\n@@ -74,6 +74,10 @@ separate lines indicate the old and the new mode.\n       rename from b\n       rename to a\n \n+5.  Hunk headers mention the name of the function to which the hunk\n+    applies.  See linkgit:gitattributes[5] for details of how to tailor\n+    to this to specific languages.\n+\n \n Combined diff format\n --------------------\n\nbase-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7\n-- \ngitgitgadget\n"},{"id":"423064","messageId":"xmqqh7jsdvlb.fsf@gitster.g","threadId":"55564","inReplyTo":"pull.940.git.1619463549689.gitgitgadget@gmail.com","subject":"Re: [PATCH] doc: point to diff attribute in patch format docs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-04-27T07:40:00Z","receivedAt":"2021-04-27T07:40:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Peter Oliver via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> @@ -11,7 +11,7 @@ linkgit:git-diff-files[1]\n>  with the `-p` option produces patch text.\n>  You can customize the creation of patch text via the\n>  `GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables\n> -(see linkgit:git[1]).\n> +(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).\n>  \n>  What the -p option produces is slightly different from the traditional\n>  diff format:\n> @@ -74,6 +74,10 @@ separate lines indicate the old and the new mode.\n>        rename from b\n>        rename to a\n>  \n> +5.  Hunk headers mention the name of the function to which the hunk\n> +    applies.  See linkgit:gitattributes[5] for details of how to tailor\n> +    to this to specific languages.\n\nShouldn't this part be as helpful as the change you made to the\nearlier part by mentioning that the user wants to look at a specific\npart of the document, instead of reading the entire gitattributes(5)\nmanpage?  Perhaps \"Defining a custom hunk header\" section is what\nthey want to refer to.\n\n\n>  Combined diff format\n>  --------------------\n>\n> base-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7\n"},{"id":"423077","messageId":"aa421f19-2ac5-570-61a0-100fa526423@froglet.home.mavit.org.uk","threadId":"55564","inReplyTo":"xmqqh7jsdvlb.fsf@gitster.g","subject":"Re: [PATCH] doc: point to diff attribute in patch format docs","fromName":"Peter Oliver","fromEmail":"p.d.oliver@mavit.org.uk","sentAt":"2021-04-27T10:37:44Z","receivedAt":"2021-04-27T10:37:53Z","isPatch":true,"sender":{"key":"p.d.oliver@mavit.org.uk","avatar":null},"body":"On Tue, 27 Apr 2021, Junio C Hamano wrote:\n\n> \"Peter Oliver via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> +5.  Hunk headers mention the name of the function to which the hunk\n>> +    applies.  See linkgit:gitattributes[5] for details of how to tailor\n>> +    to this to specific languages.\n>\n> Shouldn't this part be as helpful as the change you made to the\n> earlier part by mentioning that the user wants to look at a specific\n> part of the document, instead of reading the entire gitattributes(5)\n> manpage?  Perhaps \"Defining a custom hunk header\" section is what\n> they want to refer to.\n\nThanks, good suggestion.\n\n-- \nPeter Oliver\n"},{"id":"423101","messageId":"pull.940.v2.git.1619521378282.gitgitgadget@gmail.com","threadId":"55564","inReplyTo":"pull.940.git.1619463549689.gitgitgadget@gmail.com","subject":"[PATCH v2] doc: point to diff attribute in patch format docs","fromName":"Peter Oliver via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-04-27T11:02:57Z","receivedAt":"2021-04-27T11:03:03Z","isPatch":true,"sender":{"key":"p.d.oliver@mavit.org.uk","avatar":null},"body":"From: Peter Oliver <git@mavit.org.uk>\n\nFrom the documentation for generating patch text with diff-related\ncommands, refer to the documentation for the diff attribute.\n\nThis attribute influences the way that patches are generated, but this\nwas previously not mentioned in e.g., the git-diff manpage.\n\nSigned-off-by: Peter Oliver <git@mavit.org.uk>\n---\n    doc: point to diff attribute in patch format docs\n    \n    From the documentation for generating patch text with diff-related\n    commands, refer to the documentation for the diff attribute.\n    \n    This attribute influences the way that patches are generated, but this\n    was previously not mentioned in e.g., the git-diff manpage.\n    \n    v2: Mention the specific relevant section of the gitattributes manual.\n    Thanks to Junio C Hamano for the suggestion.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-940%2Fmavit%2Fdiff-gitattributes-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-940/mavit/diff-gitattributes-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/940\n\nRange-diff vs v1:\n\n 1:  6f87f3962b84 ! 1:  191d81ef61a5 doc: point to diff attribute in patch format docs\n     @@ Documentation/diff-generate-patch.txt: separate lines indicate the old and the n\n             rename to a\n       \n      +5.  Hunk headers mention the name of the function to which the hunk\n     -+    applies.  See linkgit:gitattributes[5] for details of how to tailor\n     -+    to this to specific languages.\n     ++    applies.  See \"Defining a custom hunk-header\" in\n     ++    linkgit:gitattributes[5] for details of how to tailor to this to\n     ++    specific languages.\n      +\n       \n       Combined diff format\n\n\n Documentation/diff-generate-patch.txt | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\nindex 2db8eacc3ec7..c78063d4f74a 100644\n--- a/Documentation/diff-generate-patch.txt\n+++ b/Documentation/diff-generate-patch.txt\n@@ -11,7 +11,7 @@ linkgit:git-diff-files[1]\n with the `-p` option produces patch text.\n You can customize the creation of patch text via the\n `GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables\n-(see linkgit:git[1]).\n+(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).\n \n What the -p option produces is slightly different from the traditional\n diff format:\n@@ -74,6 +74,11 @@ separate lines indicate the old and the new mode.\n       rename from b\n       rename to a\n \n+5.  Hunk headers mention the name of the function to which the hunk\n+    applies.  See \"Defining a custom hunk-header\" in\n+    linkgit:gitattributes[5] for details of how to tailor to this to\n+    specific languages.\n+\n \n Combined diff format\n --------------------\n\nbase-commit: 311531c9de557d25ac087c1637818bd2aad6eb3a\n-- \ngitgitgadget\n"}]}