Skip to content

Commit bc5482e

Browse files
Martin Ågrengitster
Martin Ågren
authored andcommitted
git-diff.txt: don't mark required argument as optional
Commit b7e10b2 ("Documentation: usage for diff combined commits", 2020-06-12) modified the synopsis by adding an optional "[<commit>...]" to 'git diff' [<options>] <commit> <commit> [--] [<path>...] to effectively add 'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...] as another valid invocation. Which makes sense. Further down, in the description, it left the existing entry for 'git diff' [<options>] <commit> <commit> [--] [<path>...] intact and added a new entry on 'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...] where it says that "[t]his form is to view the results of a merge commit" and details how "the first listed commit must be the merge itself". But one possible instantiation of this form is `git diff <commit> <commit>` for which the added text doesn't really apply. Remove the brackets so that we lose this overlap between the two descriptions. We can still use the more compact representation in the synopsis. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5f46e61 commit bc5482e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/git-diff.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ files on disk.
6969
one side is omitted, it will have the same effect as
7070
using HEAD instead.
7171

72-
'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...]::
72+
'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...]::
7373

7474
This form is to view the results of a merge commit. The first
7575
listed <commit> must be the merge itself; the remaining two or

0 commit comments

Comments
 (0)