aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/add.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-08-31 17:21:49 -0400
committerJunio C Hamano <gitster@pobox.com>2023-09-05 14:48:17 -0700
commitabf2952f83f657ff40a731aa4b370350711029f4 (patch)
tree6c9463a7b8a4154bae291bff42fec054ea14d11f /builtin/add.c
parent62c5358a5e728d332e4a991c87d9eb0d5161a02a (diff)
downloadgit-abf2952f83f657ff40a731aa4b370350711029f4.tar.gz
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/add.c')
-rw-r--r--builtin/add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 4b0dd798df..cf59108523 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -232,6 +232,8 @@ static char *chmod_arg;
static int ignore_removal_cb(const struct option *opt, const char *arg, int unset)
{
+ BUG_ON_OPT_ARG(arg);
+
/* if we are told to ignore, we are not adding removals */
*(int *)opt->value = !unset ? 0 : 1;
return 0;