Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Rica <jasampler@gmail.com>2008-04-09 15:07:14 +0400
committerJunio C Hamano <gitster@pobox.com>2008-04-10 11:20:31 +0400
commit3f36cbbaaf87b67abafa851e2808735553f92b06 (patch)
treeddd8abf256cc0925937be005da0d34b874d3410d /parse-options.c
parentee5a317e0130ab2db59db97c644576335530512d (diff)
Fix documentation syntax of optional arguments in short options.
When an argument for an option is optional, like in -n from git-tag, puting a space between the option and the argument is interpreted as a missing argument for the option plus an isolated argument. Documentation now reflects the need to write the parameter following the option -n, as in "git tag -nARG", for instance. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-options.c b/parse-options.c
index d9562ba504..59dc9ce6b4 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -330,7 +330,7 @@ void usage_with_options_internal(const char * const *usagestr,
switch (opts->type) {
case OPTION_INTEGER:
if (opts->flags & PARSE_OPT_OPTARG)
- pos += fprintf(stderr, " [<n>]");
+ pos += fprintf(stderr, "[<n>]");
else
pos += fprintf(stderr, " <n>");
break;