Re: [PATCH v4 08/17] builtin/pack-objects.c: --cruft without expiration
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 19, 2022, 10:04 UTC
- Message-ID
- <xmqq7d6hsusd.fsf@gitster.g>
- In-Reply-To
- <94fe03cc65716b6102e2d71df49d4ae5a1a60dc7.1652915424.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 17 quoted lines
> @@ -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().