summaryrefslogtreecommitdiff
path: root/builtin-show-branch.c
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-06-07 16:39:15 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-09 00:15:57 -0700
commite169b974593c27ba7a0d7f63ec0ec40373cb64bb (patch)
tree6362500196263a0a0dc2b33315ac83dffdd94ca4 /builtin-show-branch.c
parentd1fff6fce0e065d1dbb1450146a6f6f79b349229 (diff)
downloadgit-e169b974593c27ba7a0d7f63ec0ec40373cb64bb.tar.gz
show-branch: don't use LASTARG_DEFAULT with OPTARG
5734365 (show-branch: migrate to parse-options API 2009-05-21) incorrectly set the --more option's flags to be PARSE_OPT_LASTARG_DEFAULT and PARSE_OPT_OPTARG. These two flags shouldn't be used together. An option taking a default should just set the default value desired and parse options will take care of the rest. Update the header comment to better convey this information. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-show-branch.c')
-rw-r--r--builtin-show-branch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-show-branch.c b/builtin-show-branch.c
index 9433811956..01bea3b583 100644
--- a/builtin-show-branch.c
+++ b/builtin-show-branch.c
@@ -657,8 +657,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
"color '*!+-' corresponding to the branch"),
{ OPTION_INTEGER, 0, "more", &extra, "n",
"show <n> more commits after the common ancestor",
- PARSE_OPT_OPTARG | PARSE_OPT_LASTARG_DEFAULT,
- NULL, (intptr_t)1 },
+ PARSE_OPT_OPTARG, NULL, (intptr_t)1 },
OPT_SET_INT(0, "list", &extra, "synonym to more=-1", -1),
OPT_BOOLEAN(0, "no-name", &no_name, "suppress naming strings"),
OPT_BOOLEAN(0, "current", &with_current_branch,