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>maint
parent
ee5a317e01
commit
3f36cbbaaf
|
|
@ -11,7 +11,7 @@ SYNOPSIS
|
||||||
[verse]
|
[verse]
|
||||||
'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <name> [<head>]
|
'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <name> [<head>]
|
||||||
'git-tag' -d <name>...
|
'git-tag' -d <name>...
|
||||||
'git-tag' [-n [<num>]] -l [<pattern>]
|
'git-tag' [-n[<num>]] -l [<pattern>]
|
||||||
'git-tag' -v <name>...
|
'git-tag' -v <name>...
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
@ -54,7 +54,7 @@ OPTIONS
|
||||||
-v::
|
-v::
|
||||||
Verify the gpg signature of the given tag names.
|
Verify the gpg signature of the given tag names.
|
||||||
|
|
||||||
-n <num>::
|
-n<num>::
|
||||||
<num> specifies how many lines from the annotation, if any,
|
<num> specifies how many lines from the annotation, if any,
|
||||||
are printed when using -l.
|
are printed when using -l.
|
||||||
The default is not to print any annotation lines.
|
The default is not to print any annotation lines.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
static const char * const git_tag_usage[] = {
|
static const char * const git_tag_usage[] = {
|
||||||
"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
|
"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
|
||||||
"git-tag -d <tagname>...",
|
"git-tag -d <tagname>...",
|
||||||
"git-tag -l [-n [<num>]] [<pattern>]",
|
"git-tag -l [-n[<num>]] [<pattern>]",
|
||||||
"git-tag -v <tagname>...",
|
"git-tag -v <tagname>...",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ void usage_with_options_internal(const char * const *usagestr,
|
||||||
switch (opts->type) {
|
switch (opts->type) {
|
||||||
case OPTION_INTEGER:
|
case OPTION_INTEGER:
|
||||||
if (opts->flags & PARSE_OPT_OPTARG)
|
if (opts->flags & PARSE_OPT_OPTARG)
|
||||||
pos += fprintf(stderr, " [<n>]");
|
pos += fprintf(stderr, "[<n>]");
|
||||||
else
|
else
|
||||||
pos += fprintf(stderr, " <n>");
|
pos += fprintf(stderr, " <n>");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue