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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c
index 813eb6301b..e2f3eaed07 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -29,13 +29,6 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset)
return 0;
}
-int parse_opt_approxidate_cb(const struct option *opt, const char *arg,
- int unset)
-{
- *(timestamp_t *)(opt->value) = approxidate(arg);
- return 0;
-}
-
int parse_opt_expiry_date_cb(const struct option *opt, const char *arg,
int unset)
{
@@ -66,6 +59,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;
@@ -88,6 +83,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))
@@ -118,6 +115,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;
}