Skip to content

Commit 62b42d3

Browse files
peffgitster
authored andcommitted
docs: fix some antique example output
These diff-index and diff-tree sample outputs date back to the first month of git's existence. The output format has changed slightly since then, so let's have it match the current output. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 715e716 commit 62b42d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Documentation/git-diff-index.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ show that. So let's say that you have edited `kernel/sched.c`, but
9696
have not actually done a 'git update-index' on it yet - there is no
9797
"object" associated with the new state, and you get:
9898

99-
torvalds@ppc970:~/v2.6/linux> git diff-index HEAD
100-
*100644->100664 blob 7476bb......->000000...... kernel/sched.c
99+
torvalds@ppc970:~/v2.6/linux> git diff-index --abbrev HEAD
100+
:100644 100664 7476bb... 000000... kernel/sched.c
101101

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

Documentation/git-diff-tree.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ so it can be used to name subdirectories.
138138

139139
An example of normal usage is:
140140

141-
torvalds@ppc970:~/git> git diff-tree 5319e4......
142-
*100664->100664 blob ac348b.......->a01513....... git-fsck-objects.c
141+
torvalds@ppc970:~/git> git diff-tree --abbrev 5319e4
142+
:100664 100664 ac348b... a01513... git-fsck-objects.c
143143

144144
which tells you that the last commit changed just one file (it's from
145145
this one:

0 commit comments

Comments
 (0)