Skip to content

Commit 1863dbd

Browse files
committed
Merge branch 'ct/diff-with-merge-base-clarification' into master
Doc update. * ct/diff-with-merge-base-clarification: git-diff.txt: reorder possible usages git-diff.txt: don't mark required argument as optional
2 parents 12f5eb9 + 78b76d3 commit 1863dbd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Documentation/git-diff.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ files on disk.
6363
This is to view the changes between two arbitrary
6464
<commit>.
6565

66-
'git diff' [<options>] <commit>..<commit> [--] [<path>...]::
67-
68-
This is synonymous to the previous form. If <commit> on
69-
one side is omitted, it will have the same effect as
70-
using HEAD instead.
71-
72-
'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...]::
66+
'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...]::
7367

7468
This form is to view the results of a merge commit. The first
7569
listed <commit> must be the merge itself; the remaining two or
@@ -78,6 +72,13 @@ files on disk.
7872
For instance, if `master` names a merge commit, `git diff master
7973
master^@` gives the same combined diff as `git show master`.
8074

75+
'git diff' [<options>] <commit>..<commit> [--] [<path>...]::
76+
77+
This is synonymous to the earlier form (without the "..") for
78+
viewing the changes between two arbitrary <commit>. If <commit> on
79+
one side is omitted, it will have the same effect as
80+
using HEAD instead.
81+
8182
'git diff' [<options>] <commit>\...<commit> [--] [<path>...]::
8283

8384
This form is to view the changes on the branch containing

0 commit comments

Comments
 (0)