From: Junio C Hamano Date: Thu, 19 May 2022 10:04:18 GMT Subject: Re: [PATCH v4 08/17] builtin/pack-objects.c: --cruft without expiration Message-ID: In-Reply-To: <94fe03cc65716b6102e2d71df49d4ae5a1a60dc7.1652915424.git.me@ttaylorr.com> Taylor Blau writes: > @@ -3870,6 +4034,20 @@ static int option_parse_unpack_unreachable(const struct option *opt, > return 0; > } > > +static int option_parse_cruft_expiration(const struct option *opt, > + const char *arg, int unset) > +{ > + if (unset) { > + cruft = 0; > + cruft_expiration = 0; > + } else { > + cruft = 1; > + if (arg) > + cruft_expiration = approxidate(arg); > + } > + return 0; > +} It is somewhat sad that we have to invent this function, instead of using parse_opt_expiry_date_cb().