Skip to content

Commit c2999ad

Browse files
committed
Merge branch 'jc/doc-diff-blobs' into maint
* jc/doc-diff-blobs: Documentation: Describe "git diff <blob> <blob>" separately
2 parents a7b5e91 + bd52900 commit c2999ad

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/git-diff.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SYNOPSIS
1212
'git diff' [options] [<commit>] [--] [<path>...]
1313
'git diff' [options] --cached [<commit>] [--] [<path>...]
1414
'git diff' [options] <commit> <commit> [--] [<path>...]
15+
'git diff' [options] <blob> <blob>
1516
'git diff' [options] [--no-index] [--] <path> <path>
1617

1718
DESCRIPTION
@@ -55,6 +56,11 @@ directories. This behavior can be forced by --no-index.
5556
This is to view the changes between two arbitrary
5657
<commit>.
5758

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+
5864
'git diff' [--options] <commit>..<commit> [--] [<path>...]::
5965

6066
This is synonymous to the previous form. If <commit> on
@@ -72,8 +78,7 @@ directories. This behavior can be forced by --no-index.
7278
Just in case if you are doing something exotic, it should be
7379
noted that all of the <commit> in the above description, except
7480
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>.
7782

7883
For a more complete list of ways to spell <commit>, see
7984
"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].

0 commit comments

Comments
 (0)