Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c
index 6a61166b26..8c9edce52f 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -58,6 +58,8 @@ int parse_opt_verbosity_cb(const struct option *opt, const char *arg,
{
int *target = opt->value;
+ BUG_ON_OPT_ARG(arg);
+
if (unset)
/* --no-quiet, --no-verbose */
*target = 0;
@@ -80,6 +82,8 @@ int parse_opt_commits(const struct option *opt, const char *arg, int unset)
struct object_id oid;
struct commit *commit;
+ BUG_ON_OPT_NEG(unset);
+
if (!arg)
return -1;
if (get_oid(arg, &oid))
@@ -110,6 +114,9 @@ int parse_opt_object_name(const struct option *opt, const char *arg, int unset)
int parse_opt_tertiary(const struct option *opt, const char *arg, int unset)
{
int *target = opt->value;
+
+ BUG_ON_OPT_ARG(arg);
+
*target = unset ? 2 : 1;
return 0;
}