git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Philippe Blain <levraiphilippeblain@gmail.com>,
	Philippe Blain <levraiphilippeblain@gmail.com>
Subject: [PATCH 3/3] diff-index.txt: update raw output format in examples
Date: Mon, 13 Jun 2022 12:29:43 +0000	[thread overview]
Message-ID: <af67c33916f5ff29f158f400d6365e6c09e80eea.1655123383.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1259.git.1655123383.gitgitgadget@gmail.com>

From: Philippe Blain <levraiphilippeblain@gmail.com>

The two examples in the doc for 'git diff-index' were not updated when
the raw output format was changed in 81e50eabf0 ([PATCH] The diff-raw
format updates., 2005-05-21) (first example) and in b6d8f309d9 ([PATCH]
diff-raw format update take #2., 2005-05-23) and 7cb6ac1e4b (diff:
diff_aligned_abbrev: remove ellipsis after abbreviated SHA-1 value,
2017-12-03) (second example).

Update the output, inventing some characters to complete the source
hash in the second example. Also correct the destination mode in the
second example, which was wrongly '100664' since the addition of the
example in c64b9b8860 (Reference documentation for the core git
commands., 2005-05-05).

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 Documentation/git-diff-index.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt
index 679cae27d9b..c30d8f0da8a 100644
--- a/Documentation/git-diff-index.txt
+++ b/Documentation/git-diff-index.txt
@@ -69,8 +69,8 @@ done an `update-index` to make that effective in the index file.
 matches my working directory. But doing a 'git diff-index' does:
 
   torvalds@ppc970:~/git> git diff-index --cached HEAD
-  -100644 blob    4161aecc6700a2eb579e842af0b7f22b98443f74        commit.c
-  +100644 blob    4161aecc6700a2eb579e842af0b7f22b98443f74        git-commit.c
+  :100644 000000 4161aecc6700a2eb579e842af0b7f22b98443f74 0000000000000000000000000000000000000000 D	commit.c
+  :000000 100644 0000000000000000000000000000000000000000 4161aecc6700a2eb579e842af0b7f22b98443f74 A	git-commit.c
 
 You can see easily that the above is a rename.
 
@@ -103,7 +103,7 @@ have not actually done a 'git update-index' on it yet - there is no
 "object" associated with the new state, and you get:
 
   torvalds@ppc970:~/v2.6/linux> git diff-index --abbrev HEAD
-  :100644 100664 7476bb... 000000...      kernel/sched.c
+  :100644 100644 7476bb5ba 000000000 M	kernel/sched.c
 
 i.e., it shows that the tree has changed, and that `kernel/sched.c` is
 not up to date and may contain new stuff. The all-zero sha1 means that to
-- 
gitgitgadget

  parent reply	other threads:[~2022-06-13 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 12:29 [PATCH 0/3] Fix a few documentation errors around the raw diff output Philippe Blain via GitGitGadget
2022-06-13 12:29 ` [PATCH 1/3] diff-format.txt: fix ancient copy-paste error Philippe Blain via GitGitGadget
2022-06-13 18:23   ` Junio C Hamano
2022-06-13 18:26   ` Junio C Hamano
2022-06-14 12:20     ` Philippe Blain
2022-06-13 12:29 ` [PATCH 2/3] diff-format.txt: correct misleading wording Philippe Blain via GitGitGadget
2022-06-13 18:56   ` Junio C Hamano
2022-06-14 12:31     ` Philippe Blain
2022-06-13 12:29 ` Philippe Blain via GitGitGadget [this message]
2022-06-13 18:59   ` [PATCH 3/3] diff-index.txt: update raw output format in examples Junio C Hamano
2022-06-13 18:15 ` [PATCH 0/3] Fix a few documentation errors around the raw diff output 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=af67c33916f5ff29f158f400d6365e6c09e80eea.1655123383.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=levraiphilippeblain@gmail.com \
    /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).