Documentation: Describe "git diff <blob> <blob>" separately
As it was not a common operation, it was described as if it is a side note for the more common two-commit variant, but this mode behaves very differently, e.g. it does not make any sense to ask recursive behaviour, or give the command a pathspec. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 18, 2012 at 11:35 UTC
bd52900df474cfbc67c89e3a2fb30e7ed2df8e78
1 file changed
+7
-2
Documentation/git-diff.txt
+7
-2
@@ -12,6 +12,7 @@ SYNOPSIS
12
'git diff' [options] [<commit>] [--] [<path>...]
13
'git diff' [options] --cached [<commit>] [--] [<path>...]
14
'git diff' [options] <commit> <commit> [--] [<path>...]
15
+'git diff' [options] <blob> <blob>
16
'git diff' [options] [--no-index] [--] <path> <path>
17
18
DESCRIPTION
@@ -55,6 +56,11 @@ directories. This behavior can be forced by --no-index.
56
This is to view the changes between two arbitrary
57
<commit>.
58
59
+'git diff' [options] <blob> <blob>::
60
+
61
+ This form is to view the differences between the raw
62
+ contents of two blob objects.
63
+
64
'git diff' [--options] <commit>..<commit> [--] [<path>...]::
65
66
This is synonymous to the previous form. If <commit> on
@@ -72,8 +78,7 @@ directories. This behavior can be forced by --no-index.
78
Just in case if you are doing something exotic, it should be
79
noted that all of the <commit> in the above description, except
80
in the last two forms that use ".." notations, can be any
75
-<tree>. The third form ('git diff <commit> <commit>') can also
76
-be used to compare two <blob> objects.
81
+<tree>.
82
83
For a more complete list of ways to spell <commit>, see
84
"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].