diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-12-21 15:19:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-12-21 15:19:13 -0800 |
commit | 814a1924b4ff5bae8aecb4222e6cefc58331527c (patch) | |
tree | 24b42033898b65c84aaa93d80ab0bb11eb2442a4 /Documentation | |
parent | 51bf6bea513fc41b615d80512d37227f1983cb70 (diff) | |
parent | bd52900df474cfbc67c89e3a2fb30e7ed2df8e78 (diff) | |
download | git-814a1924b4ff5bae8aecb4222e6cefc58331527c.tar.gz |
Merge branch 'jc/doc-diff-blobs'
"git diff <blob> <blob>" was not documented and was only hinted as
an extension to "git diff <commit> <commit> -- <pathspec>", but
comparison between two blobs are more special than that. It does
not take any pathspec to begin with.
* jc/doc-diff-blobs:
Documentation: Describe "git diff <blob> <blob>" separately
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-diff.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index f8d0819113..f8c06013f3 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -12,6 +12,7 @@ SYNOPSIS 'git diff' [options] [<commit>] [--] [<path>...] 'git diff' [options] --cached [<commit>] [--] [<path>...] 'git diff' [options] <commit> <commit> [--] [<path>...] +'git diff' [options] <blob> <blob> 'git diff' [options] [--no-index] [--] <path> <path> DESCRIPTION @@ -55,6 +56,11 @@ directories. This behavior can be forced by --no-index. This is to view the changes between two arbitrary <commit>. +'git diff' [options] <blob> <blob>:: + + This form is to view the differences between the raw + contents of two blob objects. + 'git diff' [--options] <commit>..<commit> [--] [<path>...]:: This is synonymous to the previous form. If <commit> on @@ -72,8 +78,7 @@ directories. This behavior can be forced by --no-index. Just in case if you are doing something exotic, it should be noted that all of the <commit> in the above description, except in the last two forms that use ".." notations, can be any -<tree>. The third form ('git diff <commit> <commit>') can also -be used to compare two <blob> objects. +<tree>. For a more complete list of ways to spell <commit>, see "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. |