Re: [PATCH] push: comment on a funny unbalanced option help
- From
René Scharfe <l.s.r@web.de>
- Date
- Aug 2, 2018, 15:16 UTC
- Message-ID
- <80e861f0-717e-6678-ff1d-0c1198cb9c6f@web.de>
- In-Reply-To
- <e7e5f54d-04b6-4d0f-0bcb-692801f0719c@web.de>
Am 02.08.2018 um 17:06 schrieb René Scharfe:
Show 12 quoted lines
> According to its manpage the option should rather be shown like this: > > --force-with-lease[=<refname>[:<expect>]] > > ... to indicate that all three forms are valid: > > --force-with-lease > --force-with-lease=some_ref > --force-with-lease=some_ref:but_not_this > > The current code doesn't allow that to be expressed, while it's possible > with my patch.
Err, anything is possible with PARSE_OPT_LITERAL_ARGHELP, of course, but with my patch that flag is automatically inferred if you use the argh string "<refname>[:<expect>]".
René