From 27ec394a9701675762f02e9af464be2c297c6cf1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 25 Apr 2013 11:13:49 -0700 Subject: prune: introduce OPT_EXPIRY_DATE() and use it Earlier we added support for --expire=all (or --expire=now) that considers all crufts, regardless of their age, as eligible for garbage collection by turning command argument parsers that use approxidate() to use parse_expiry_date(), but "git prune" used a built-in parse-options facility OPT_DATE() and did not benefit from the new function. Signed-off-by: Junio C Hamano --- parse-options-cb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'parse-options-cb.c') diff --git a/parse-options-cb.c b/parse-options-cb.c index 0de5fb168a..be8c413cfe 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -33,6 +33,12 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg, return 0; } +int parse_opt_expiry_date_cb(const struct option *opt, const char *arg, + int unset) +{ + return parse_expiry_date(arg, (unsigned long *)opt->value); +} + int parse_opt_color_flag_cb(const struct option *opt, const char *arg, int unset) { -- cgit v1.3