threads / patch / 20534

patch[TRIVIAL] Documentation: add: <filepattern>... is optional

Subject: [PATCH] [TRIVIAL] Documentation: add: <filepattern>... is optional

## tl;dr

3 messages between Aug 11, 2009 and Aug 11, 2009. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Paul Bolle· Aug 11, 2009, 13:03 UTC · lore

<filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
 Documentation/git-add.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to Documentation/git-add.txt +1 −1
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index ab1943c..e67b7e8 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -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
 -----------
-- 
1.6.4
Nicolas Sebrecht· Aug 11, 2009, 14:50 UTC · re: Paul Bolle · lore

[PATCH] Re: [TRIVIAL] Documentation: add: <filepattern>... is optional

The 11/08/09, Paul Bolle wrote:
> <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)"
.
-- 
Nicolas Sebrecht
Paul Bolle· Aug 11, 2009, 15:06 UTC · re: Nicolas Sebrecht · lore

Re: [PATCH] Re: [TRIVIAL] Documentation: add: <filepattern>... is optional

On Tue, 2009-08-11 at 16:50 +0200, Nicolas Sebrecht wrote:
Show 6 quoted lines
> The 11/08/09, Paul Bolle wrote:
> 
> > <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

← back to recent threads