Skip to contentSkip to conversation

Documentation: add: <filepattern>... is optional

PATCH In review Paul Bolle 2 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

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
index ab1943c..e67b7e8 100644
@@ -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
#1 lore raw
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
author
#2 lore raw
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