summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee5a317)
raw | patch | inline | side by side (parent: ee5a317)
author | Carlos Rica <jasampler@gmail.com> | |
Wed, 9 Apr 2008 11:07:14 +0000 (13:07 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Apr 2008 07:20:31 +0000 (00:20 -0700) |
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>
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>
Documentation/git-tag.txt | patch | blob | history | |
builtin-tag.c | patch | blob | history | |
parse-options.c | patch | blob | history |
index b62a3d1c5896a3b2e32af58029115240d609f37b..74b461f66194be5abc944c9feeb8666125955d82 100644 (file)
[verse]
'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <name> [<head>]
'git-tag' -d <name>...
-'git-tag' [-n [<num>]] -l [<pattern>]
+'git-tag' [-n[<num>]] -l [<pattern>]
'git-tag' -v <name>...
DESCRIPTION
-v::
Verify the gpg signature of the given tag names.
--n <num>::
+-n<num>::
<num> specifies how many lines from the annotation, if any,
are printed when using -l.
The default is not to print any annotation lines.
diff --git a/builtin-tag.c b/builtin-tag.c
index 9a59caf70d74cae9b7eae858402233ad6f7c3984..95ecfdbab650f3b60bb3ecb7e20f68a913470d20 100644 (file)
--- a/builtin-tag.c
+++ b/builtin-tag.c
static const char * const git_tag_usage[] = {
"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
"git-tag -d <tagname>...",
- "git-tag -l [-n [<num>]] [<pattern>]",
+ "git-tag -l [-n[<num>]] [<pattern>]",
"git-tag -v <tagname>...",
NULL
};
diff --git a/parse-options.c b/parse-options.c
index d9562ba5047ff1c9994755a4dbec5162b551c788..59dc9ce6b471c61aff22d51293ee3d74b020c88a 100644 (file)
--- a/parse-options.c
+++ b/parse-options.c
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;