diff options
| author | René Scharfe <l.s.r@web.de> | 2025-07-09 11:44:09 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-09 08:39:00 -0700 |
| commit | 369e6d94b21d238a203ffb702605f97aca5704c9 (patch) | |
| tree | a7e15b9cdd0d1ea83f42d7137598776e323a65d1 | |
| parent | 16bd9f20a403117f2e0d9bcda6c6e621d3763e77 (diff) | |
| download | git-369e6d94b21d238a203ffb702605f97aca5704c9.tar.gz | |
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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rw-r--r-- | parse-options.c | 1 |
1 files changed, 1 insertions, 0 deletions
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"); |
