Documentation: add: <filepattern>... is optional
PATCH 1/1 Documentation: add: <filepattern>... is optional
<filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis.
--- Documentation/git-add.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/git-add.txt +1 -1
@@ -10,7 +10,7 @@ SYNOPSIS [verse] 'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N] - [--refresh] [--ignore-errors] [--] <filepattern>... + [--refresh] [--ignore-errors] [--] [<filepattern>...] DESCRIPTION -----------
Signature · 1 line
1.6.4
Quoted 2 lines · Paul Bolle
<filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis.
So <filepattern> is needed in all other cases. The '-u' description already has
" If no paths are specified, all tracked files in the current
directory and its subdirectories are updated. "
and '-a' refers to '-u'
"(same as --update)"
.
Signature · 1 line
Nicolas Sebrecht
Quoted 6 lines · Nicolas Sebrecht
Quoted 2 lines · Paul Bolle
<filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis.
So <filepattern> is needed in all other cases.
Since it is an optional argument in those cases I'd say it is better to indicate that it is optional in the synopsis too.
Paul Bolle