summaryrefslogtreecommitdiff
path: root/builtin/show-branch.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-11-05 01:42:40 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-06 12:55:36 +0900
commit403d2ba52cb63d4bf5a8baf5480efc538f405c09 (patch)
tree5959446739c88824009d6036cbb426c97c8d9c73 /builtin/show-branch.c
parentformat-patch: mark "--no-numbered" option with NONEG (diff)
downloadtgif-403d2ba52cb63d4bf5a8baf5480efc538f405c09.tar.xz
show-branch: mark --reflog option as NONEG
Running "git show-branch --no-reflog" will behave as if "--reflog" was given with no options, which makes no sense. In theory this option might be used to cancel an earlier "--reflog" option, but the semantics are not clear. Let's punt on it and just disallow the broken option. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/show-branch.c')
-rw-r--r--builtin/show-branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 65f4a4c83c..b1b540f7f6 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -674,7 +674,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
{ OPTION_CALLBACK, 'g', "reflog", &reflog_base, N_("<n>[,<base>]"),
N_("show <n> most recent ref-log entries starting at "
"base"),
- PARSE_OPT_OPTARG,
+ PARSE_OPT_OPTARG | PARSE_OPT_NONEG,
parse_reflog_param },
OPT_END()
};