From: Junio C Hamano Date: Sat, 21 Apr 2018 03:13:13 GMT Subject: Re: Silly "git gc" UI issue. Message-ID: In-Reply-To: <20180420072701.GB13462@ruderich.org> Simon Ruderich writes: > On Thu, Apr 19, 2018 at 02:10:40PM +0900, Junio C Hamano wrote: >> diff --git a/parse-options-cb.c b/parse-options-cb.c >> index c6679cb2cd..872627eafe 100644 >> --- a/parse-options-cb.c >> +++ b/parse-options-cb.c >> @@ -38,7 +38,11 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg, >> int parse_opt_expiry_date_cb(const struct option *opt, const char *arg, >> int unset) >> { >> - return parse_expiry_date(arg, (timestamp_t *)opt->value); >> + if (unset) >> + arg = "never"; >> + if (parse_expiry_date(arg, (timestamp_t *)opt->value)) >> + die("malformed expiration date '%s'", arg); >> + return 0; >> } > > Should this error get translated? Sure. The new test to check this codepath even protects itself from such a translation by using test_i18ngrep, so this is safe to mark for translation from day one. Thanks. -- >8 -- Subject: [PATCH v2] parseopt: handle malformed --expire arguments more nicely A few commands that parse --expire=