From: René Scharfe Date: Wed, 9 Jul 2025 09:44:09 +0000 (+0200) Subject: parse-options: require PARSE_OPT_NOARG for OPTION_BITOP X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=369e6d94b21d238a203ffb702605f97aca5704c9;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/parse-options.c b/parse-options.c index a9a39ecaef..68ff494492 100644 --- a/parse-options.c +++ b/parse-options.c @@ -591,6 +591,7 @@ static void parse_options_check(const struct option *opts) case OPTION_NEGBIT: case OPTION_SET_INT: case OPTION_NUMBER: + case OPTION_BITOP: if ((opts->flags & PARSE_OPT_OPTARG) || !(opts->flags & PARSE_OPT_NOARG)) optbug(opts, "should not accept an argument");