From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Johannes Sixt" <j6t@kdbg.org>, "Patrick Steinhardt" <ps@pks.im>,
"Jean-Noël Avila" <jn.avila@free.fr>,
"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v4 4/5] doc: git-diff: apply format changes to diff-generate-patch
Date: Mon, 18 Nov 2024 22:05:52 +0000 [thread overview]
Message-ID: <0e6162d02d102531dd07673845d02fe2385d61df.1731967553.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1769.v4.git.1731967553.gitgitgadget@gmail.com>
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
Documentation/diff-generate-patch.txt | 44 ++++++++++++++-------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index 4b5aa5c2e04..e5c813c96f3 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -14,7 +14,7 @@ You can customize the creation of patch text via the
`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables
(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]).
-What the -p option produces is slightly different from the traditional
+What the `-p` option produces is slightly different from the traditional
diff format:
1. It is preceded by a "git diff" header that looks like this:
@@ -30,20 +30,21 @@ name of the source file of the rename/copy and the name of
the file that the rename/copy produces, respectively.
2. It is followed by one or more extended header lines:
-
- old mode <mode>
- new mode <mode>
- deleted file mode <mode>
- new file mode <mode>
- copy from <path>
- copy to <path>
- rename from <path>
- rename to <path>
- similarity index <number>
- dissimilarity index <number>
- index <hash>..<hash> <mode>
+
-File modes are printed as 6-digit octal numbers including the file type
+[synopsis]
+old mode <mode>
+new mode <mode>
+deleted file mode <mode>
+new file mode <mode>
+copy from <path>
+copy to <path>
+rename from <path>
+rename to <path>
+similarity index <number>
+dissimilarity index <number>
+index <hash>..<hash> <mode>
++
+File modes _<mode>_ are printed as 6-digit octal numbers including the file type
and file permission bits.
+
Path names in extended headers do not include the `a/` and `b/` prefixes.
@@ -56,7 +57,7 @@ files, while 100% dissimilarity means that no line from the old
file made it into the new one.
+
The index line includes the blob object names before and after the change.
-The <mode> is included if the file mode does not change; otherwise,
+The _<mode>_ is included if the file mode does not change; otherwise,
separate lines indicate the old and the new mode.
3. Pathnames with "unusual" characters are quoted as explained for
@@ -134,17 +135,18 @@ or like this (when the `--cc` option is used):
2. It is followed by one or more extended header lines
(this example shows a merge with two parents):
-
- index <hash>,<hash>..<hash>
- mode <mode>,<mode>..<mode>
- new file mode <mode>
- deleted file mode <mode>,<mode>
++
+[synopsis]
+index <hash>,<hash>..<hash>
+mode <mode>,<mode>`..`<mode>
+new file mode <mode>
+deleted file mode <mode>,<mode>
+
The `mode <mode>,<mode>..<mode>` line appears only if at least one of
the <mode> is different from the rest. Extended headers with
information about detected content movement (renames and
copying detection) are designed to work with the diff of two
-<tree-ish> and are not used by combined diff format.
+_<tree-ish>_ and are not used by combined diff format.
3. It is followed by a two-line from-file/to-file header:
--
gitgitgadget
next prev parent reply other threads:[~2024-11-18 22:06 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-04 20:05 [PATCH 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-08-05 9:11 ` Patrick Steinhardt
2024-08-05 18:51 ` Jean-Noël AVILA
2024-08-06 6:27 ` Patrick Steinhardt
2024-08-04 20:05 ` [PATCH 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-08-05 5:53 ` Johannes Sixt
2024-08-05 16:08 ` Junio C Hamano
2024-08-07 20:43 ` [RFC] formatting macro Jean-Noël AVILA
2024-08-12 6:35 ` Johannes Sixt
2024-08-12 15:22 ` Junio C Hamano
2024-08-13 20:42 ` Jean-Noël AVILA
2024-08-05 20:12 ` [PATCH 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël AVILA
2024-08-04 20:05 ` [PATCH 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-11 16:53 ` [PATCH v2 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-11 16:53 ` [PATCH v2 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-11-12 0:48 ` Junio C Hamano
2024-11-12 8:40 ` Jean-Noël Avila
2024-11-12 9:13 ` Junio C Hamano
2024-11-12 18:28 ` Johannes Sixt
2024-11-12 23:01 ` Junio C Hamano
2024-11-13 7:31 ` Johannes Sixt
2024-11-13 8:59 ` Jean-Noël Avila
2024-11-11 16:53 ` [PATCH v2 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-12 0:52 ` Junio C Hamano
2024-11-12 9:04 ` Jean-Noël Avila
2024-11-12 9:14 ` Junio C Hamano
2024-11-11 16:53 ` [PATCH v2 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-12 18:51 ` Johannes Sixt
2024-11-12 23:03 ` Junio C Hamano
2024-11-13 7:39 ` Johannes Sixt
2024-11-13 8:10 ` Jean-Noël Avila
2024-11-11 16:53 ` [PATCH v2 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-11-11 16:53 ` [PATCH v2 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-12 18:51 ` Johannes Sixt
2024-11-13 8:12 ` Jean-Noël Avila
2024-11-16 19:36 ` [PATCH v3 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-16 19:36 ` [PATCH v3 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-11-17 14:04 ` Johannes Sixt
2024-11-17 16:44 ` Jean-Noël AVILA
2024-11-18 0:35 ` Junio C Hamano
2024-11-18 0:27 ` Junio C Hamano
2024-11-16 19:36 ` [PATCH v3 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-16 19:36 ` [PATCH v3 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-16 19:36 ` [PATCH v3 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-11-16 19:36 ` [PATCH v3 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-18 22:05 ` [PATCH v4 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-18 22:05 ` [PATCH v4 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2025-03-31 9:37 ` SZEDER Gábor
2025-03-31 12:55 ` [PATCH] doc: fix asciidoctor synopsis processing of triple-dots Jean-Noël Avila
2025-03-31 17:45 ` SZEDER Gábor
2025-03-31 20:30 ` Jean-Noël AVILA
2025-04-01 11:08 ` Jean-Noël Avila
2025-04-01 21:48 ` Junio C Hamano
2025-04-02 6:49 ` Jean-Noël Avila
2025-04-07 15:11 ` Junio C Hamano
2024-11-18 22:05 ` [PATCH v4 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-18 22:05 ` [PATCH v4 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-18 22:05 ` Jean-Noël Avila via GitGitGadget [this message]
2024-11-18 22:05 ` [PATCH v4 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-26 4:32 ` [PATCH v4 0/5] doc: git diff reformatting Junio C Hamano
2024-11-26 6:55 ` Johannes Sixt
2024-11-26 7:15 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e6162d02d102531dd07673845d02fe2385d61df.1731967553.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=jn.avila@free.fr \
--cc=ps@pks.im \
/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.
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 NNTP newsgroup(s).