Skip to content

Commit 369e6d9

Browse files
rscharfegitster
authored andcommitted
parse-options: require PARSE_OPT_NOARG for OPTION_BITOP
OPTION_BITOP options don't take arguments. Make sure they are declared that way using the flag PARSE_OPT_NOARG. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16bd9f2 commit 369e6d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

parse-options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ static void parse_options_check(const struct option *opts)
591591
case OPTION_NEGBIT:
592592
case OPTION_SET_INT:
593593
case OPTION_NUMBER:
594+
case OPTION_BITOP:
594595
if ((opts->flags & PARSE_OPT_OPTARG) ||
595596
!(opts->flags & PARSE_OPT_NOARG))
596597
optbug(opts, "should not accept an argument");

0 commit comments

Comments
 (0)