]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-diff.txt: don't mark required argument as optional
authorMartin Ågren <martin.agren@gmail.com>
Mon, 13 Jul 2020 19:10:08 +0000 (21:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Jul 2020 19:47:36 +0000 (12:47 -0700)
Commit b7e10b2ca2 ("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>
Documentation/git-diff.txt

index 1018110ddc2e21d2a458da6d97f9ff1f519d15b6..c613e71ca4116620bb34c7d5d0dc814b663c47a2 100644 (file)
@@ -69,7 +69,7 @@ files on disk.
        one side is omitted, it will have the same effect as
        using HEAD instead.
 
-'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...]::
+'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...]::
 
        This form is to view the results of a merge commit.  The first
        listed <commit> must be the merge itself; the remaining two or