builtin/gc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/gc.c b/builtin/gc.c index 3e67124ea..a4b20aaaf 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -354,6 +354,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) const char *name; pid_t pid; int daemonized = 0; + timestamp_t dummy; struct option builtin_gc_options[] = { OPT__QUIET(&quiet, N_("suppress progress reporting")), @@ -392,6 +393,9 @@ int cmd_gc(int argc, const char **argv, const char *prefix) if (argc > 0) usage_with_options(builtin_gc_usage, builtin_gc_options); + if (parse_expiry_date(prune_expire, &dummy)) + die(_("Failed to parse prune expiry value %s"), prune_expire); + if (aggressive) { argv_array_push(&repack, "-f"); if (aggressive_depth > 0)