Re: [RFC 2/2] exclude-promisor-objects: declare when option is allowed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 4, 2018, 02:20 UTC
- Message-ID
- <xmqq7egqghi7.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181203211555.GA8700@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> That said, our C99 designated initializer weather-balloons haven't
> gotten any complaints yet. So I think you could actually do:
>
> struct setup_revision_opt s_r_opt = {
> .allow_exclude_promisor_objects = 1,
> };
> ...
> setup_revisions(...);
>
> which is pretty nice.Yup. The output from
$ git grep -n ' \.[a-z0-9_]* =' -- \*.[ch]
with a bit of "git blame" tells us that cbc0f81d ("strbuf: use designated initializers in STRBUF_INIT", 2017-07-10) is the balloon for this exact feature. The same for array was done in 512f41cf ("clean.c: use designated initializer", 2017-07-14)
[I am writing it down so that I do not have to dig for it every time and instead can ask the list archive]