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>
This commit is contained in:

committed by
Junio C Hamano

parent
ee5a317e01
commit
3f36cbbaaf
@ -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;
|
||||
|
Reference in New Issue
Block a user