Skip to content

Commit 1971510

Browse files
phil-blaingitster
authored andcommitted
diff-index.txt: update raw output format in examples
The two examples in the doc for 'git diff-index' were not updated when the raw output format was changed in 81e50ea ([PATCH] The diff-raw format updates., 2005-05-21) (first example) and in b6d8f30 ([PATCH] diff-raw format update take #2., 2005-05-23) and 7cb6ac1 (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 c64b9b8 (Reference documentation for the core git commands., 2005-05-05). Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b396c8 commit 1971510

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/git-diff-index.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ done an `update-index` to make that effective in the index file.
6969
matches my working directory. But doing a 'git diff-index' does:
7070

7171
torvalds@ppc970:~/git> git diff-index --cached HEAD
72-
-100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c
73-
+100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c
72+
:100644 000000 4161aecc6700a2eb579e842af0b7f22b98443f74 0000000000000000000000000000000000000000 D commit.c
73+
:000000 100644 0000000000000000000000000000000000000000 4161aecc6700a2eb579e842af0b7f22b98443f74 A git-commit.c
7474

7575
You can see easily that the above is a rename.
7676

@@ -103,7 +103,7 @@ have not actually done a 'git update-index' on it yet - there is no
103103
"object" associated with the new state, and you get:
104104

105105
torvalds@ppc970:~/v2.6/linux> git diff-index --abbrev HEAD
106-
:100644 100664 7476bb... 000000... kernel/sched.c
106+
:100644 100644 7476bb5ba 000000000 M kernel/sched.c
107107

108108
i.e., it shows that the tree has changed, and that `kernel/sched.c` is
109109
not up to date and may contain new stuff. The all-zero sha1 means that to

0 commit comments

Comments
 (0)