Skip to content

Commit 403d2ba

Browse files
peffgitster
authored andcommitted
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>
1 parent 964fd83 commit 403d2ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/show-branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
674674
{ OPTION_CALLBACK, 'g', "reflog", &reflog_base, N_("<n>[,<base>]"),
675675
N_("show <n> most recent ref-log entries starting at "
676676
"base"),
677-
PARSE_OPT_OPTARG,
677+
PARSE_OPT_OPTARG | PARSE_OPT_NONEG,
678678
parse_reflog_param },
679679
OPT_END()
680680
};

0 commit comments

Comments
 (0)