diff options
author | Jeff King <peff@peff.net> | 2023-09-01 00:21:49 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-06 00:48:17 +0300 |
commit | abf2952f83f657ff40a731aa4b370350711029f4 (patch) | |
tree | 6c9463a7b8a4154bae291bff42fec054ea14d11f /builtin/log.c | |
parent | 62c5358a5e728d332e4a991c87d9eb0d5161a02a (diff) |
parse-options: add more BUG_ON() annotations
These callbacks are similar to the ones touched by 517fe807d6 (assert
NOARG/NONEG behavior of parse-options callbacks, 2018-11-05), but were
either missed in that commit (the one in add.c) or were added later (the
one in log.c).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c index 3599063554..190e1952e9 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -121,6 +121,8 @@ static struct string_list decorate_refs_include = STRING_LIST_INIT_NODUP; static int clear_decorations_callback(const struct option *opt UNUSED, const char *arg, int unset) { + BUG_ON_OPT_NEG(unset); + BUG_ON_OPT_ARG(arg); string_list_clear(&decorate_refs_include, 0); string_list_clear(&decorate_refs_exclude, 0); use_default_decoration_filter = 0; |