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>
Jeff King committed
Nov 5, 2018 at 01:42 UTC
403d2ba52cb63d4bf5a8baf5480efc538f405c09
1 file changed
+1
-1
builtin/show-branch.c
+1
-1
@@ -674,7 +674,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
674
{ OPTION_CALLBACK, 'g', "reflog", &reflog_base, N_("<n>[,<base>]"),
675
N_("show <n> most recent ref-log entries starting at "
676
"base"),
677
- PARSE_OPT_OPTARG,
677
+ PARSE_OPT_OPTARG | PARSE_OPT_NONEG,
678
parse_reflog_param },
679
OPT_END()
680
};