summaryrefslogtreecommitdiff
path: root/builtin/show-branch.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-11-05 06:42:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-06 03:55:36 (GMT)
commit403d2ba52cb63d4bf5a8baf5480efc538f405c09 (patch)
tree5959446739c88824009d6036cbb426c97c8d9c73 /builtin/show-branch.c
parent964fd83b12cbf7907f0bdb4671a467fe381487d3 (diff)
downloadgit-403d2ba52cb63d4bf5a8baf5480efc538f405c09.zip
git-403d2ba52cb63d4bf5a8baf5480efc538f405c09.tar.gz
git-403d2ba52cb63d4bf5a8baf5480efc538f405c09.tar.bz2
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 65f4a4c..b1b540f 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()
};