Re: sub-fetches discard --ipv4|6 option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 15, 2020, 20:09 UTC
- Message-ID
- <xmqq4kny2461.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200915152730.GA2853972@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Tue, Sep 15, 2020 at 04:06:13PM +0200, Alex Riesen wrote:
>
>> > Yeah, that would solve the duplication problem. We could probably add a
>> > "recursive" bit to the parse-options flag variable. Even if
>> > parse-options itself doesn't use it, it could be a convenience for
>> > callers like this one. It is a little inconvenient to set flags there,
>> > just because it usually means ditching our wrapper macros in favor of a
>> > raw struct declaration.
>>
>> Or extend the list of wrappers with _REC(URSIVE) macros
>
> If you go that route, we have some "_F" macros that take flags. Probably
> would make sense to add it more consistently, which lets you convert:
>
> OPT_BOOL('f', "foo", &foo, "the foo option");
>
> into:
>
> OPT_BOOL_F('f', "foo", &foo, "the foo option", PARSE_OPT_RECURSIVE);
>
> but could also be used for other flags.What is this "recursive" about? Does it have much in common with "passthru", or are they orthogonal?