Re: [PATCH 1/7] parse-options: introduce OPT_HIDDEN_GROUP
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 16, 2026, 21:14 UTC
- Message-ID
- <xmqqcxwmeiwq.fsf@gitster.g>
- In-Reply-To
- <20260716165517.433849-2-christian.couder@gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 16 quoted lines
> Hidden options are not shown by `git <cmd> -h`, but are still shown by
> `git <cmd> --help-all`. If there are a lot of hidden options or if they
> don't belong to the same categories as other options, there is
> currently no way to properly group them.
>
> Using `OPT_GROUP("Foo")` means that "Foo" will always be shown which we
> don't want if that group contains only hidden options.
>
> To provide a way to have groups shown only when hidden options are
> shown, let's implement an OPT_HIDDEN_GROUP macro.
>
> To test this new macro, let's also improve `test-tool parse-options`
> and test its output with `--help-all`.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---We have been doing this for quite some time, but I just noticed that the 'From' address your MUA uses ("Christian Couder <christian.couder@gmail.com>") does not match your Sign-off. Could you add an in-body 'From:' line if you plan to keep sending your patches from the Gmail address?
I suppose nobody has noticed it so far because .mailmap hides the discrepancy once the commit lands.
The changes in this step looks alright, though.
Thanks.