From 0a8a16ade6b3a55114cd0f28e5e71c2a3483d825 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 5 Nov 2018 01:44:27 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- t/helper/test-parse-options.c | 1 - 1 file changed, 1 deletion(-) (limited to 't/helper') diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 9cb8a0ea0f..f0623bb42b 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -119,7 +119,6 @@ int cmd__parse_options(int argc, const char **argv) OPT_INTEGER('j', NULL, &integer, "get a integer, too"), OPT_MAGNITUDE('m', "magnitude", &magnitude, "get a magnitude"), OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), - OPT_DATE('t', NULL, ×tamp, "get timestamp of