Skip to content

Commit

Permalink
docs: fix some antique example output
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 27, 2011
1 parent 715e716 commit 62b42d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-diff-index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ show that. So let's say that you have edited `kernel/sched.c`, but
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 HEAD
*100644->100664 blob 7476bb......->000000...... kernel/sched.c
torvalds@ppc970:~/v2.6/linux> git diff-index --abbrev HEAD
:100644 100664 7476bb... 000000... kernel/sched.c

i.e., it shows that the tree has changed, and that `kernel/sched.c` has is
not up-to-date and may contain new stuff. The all-zero sha1 means that to
Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-diff-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ so it can be used to name subdirectories.

An example of normal usage is:

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

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

0 comments on commit 62b42d3

Please sign in to comment.