diff options
author | Jeff King <peff@peff.net> | 2018-11-05 07:44:27 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-06 04:56:14 +0100 |
commit | 0a8a16ade6b3a55114cd0f28e5e71c2a3483d825 (patch) | |
tree | 5b524fa4889bb33c2a014d2a4f2cf4ccaf92c8bb /parse-options.h | |
parent | apply: return -1 from option callback instead of calling exit(1) (diff) | |
download | git-0a8a16ade6b3a55114cd0f28e5e71c2a3483d825.tar.xz git-0a8a16ade6b3a55114cd0f28e5e71c2a3483d825.zip |
parse-options: drop OPT_DATE()
There are no users of OPT_DATE except for test-parse-options; its
only caller went away in 27ec394a97 (prune: introduce OPT_EXPIRY_DATE()
and use it, 2013-04-25).
It also has a bug: it does not specify PARSE_OPT_NONEG, but its callback
does not respect the "unset" flag, and will feed NULL to approxidate()
and segfault. Probably this should be marked with NONEG, or the callback
should set the timestamp to some sentinel value (e.g,. "0", or
"(time_t)-1").
But since there are no callers, deleting it means we don't even have to
think about what the right behavior should be.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/parse-options.h b/parse-options.h index dd14911a29..c3f2d2eceb 100644 --- a/parse-options.h +++ b/parse-options.h @@ -150,9 +150,6 @@ struct option { (h), 0, &parse_opt_string_list } #define OPT_UYN(s, l, v, h) { OPTION_CALLBACK, (s), (l), (v), NULL, \ (h), PARSE_OPT_NOARG, &parse_opt_tertiary } -#define OPT_DATE(s, l, v, h) \ - { OPTION_CALLBACK, (s), (l), (v), N_("time"),(h), 0, \ - parse_opt_approxidate_cb } #define OPT_EXPIRY_DATE(s, l, v, h) \ { OPTION_CALLBACK, (s), (l), (v), N_("expiry-date"),(h), 0, \ parse_opt_expiry_date_cb } @@ -232,7 +229,6 @@ extern struct option *parse_options_concat(struct option *a, struct option *b); /*----- some often used options -----*/ extern int parse_opt_abbrev_cb(const struct option *, const char *, int); -extern int parse_opt_approxidate_cb(const struct option *, const char *, int); extern int parse_opt_expiry_date_cb(const struct option *, const char *, int); extern int parse_opt_color_flag_cb(const struct option *, const char *, int); extern int parse_opt_verbosity_cb(const struct option *, const char *, int); |