diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/am.c | 2 | ||||
-rw-r--r-- | builtin/commit-graph.c | 2 | ||||
-rw-r--r-- | builtin/env--helper.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c index 7259186408..2c7673f74e 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -2180,6 +2180,8 @@ static int parse_opt_show_current_patch(const struct option *opt, const char *ar }; int new_value = SHOW_PATCH_RAW; + BUG_ON_OPT_NEG(unset); + if (arg) { for (new_value = 0; new_value < ARRAY_SIZE(valid_modes); new_value++) { if (!strcmp(arg, valid_modes[new_value])) diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c index 988445abdf..78fa08f43a 100644 --- a/builtin/commit-graph.c +++ b/builtin/commit-graph.c @@ -128,6 +128,8 @@ static int write_option_parse_split(const struct option *opt, const char *arg, { enum commit_graph_split_flags *flags = opt->value; + BUG_ON_OPT_NEG(unset); + opts.split = 1; if (!arg) return 0; diff --git a/builtin/env--helper.c b/builtin/env--helper.c index 3aa4282114..27349098b0 100644 --- a/builtin/env--helper.c +++ b/builtin/env--helper.c @@ -17,6 +17,8 @@ static int option_parse_type(const struct option *opt, const char *arg, { enum cmdmode *cmdmode = opt->value; + BUG_ON_OPT_NEG(unset); + if (!strcmp(arg, "bool")) *cmdmode = ENV_HELPER_TYPE_BOOL; else if (!strcmp(arg, "ulong")) |