diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-05-06 10:56:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-06 11:50:07 -0700 |
commit | daa33250240406fd0ff9dfc7625b3784138a8978 (patch) | |
tree | 80fae5ed2e0378e58877520549659882b9c26676 /builtin/commit.c | |
parent | 8415507b3285dd34b4d4edc7b864eede5325b2db (diff) |
builtin/config: use `OPT_CMDMODE()` to specify modes
The git-config(1) command has various different modes which are
accessible via e.g. `--get-urlmatch` or `--unset-all`. These modes are
declared with `OPT_BIT()`, which causes two minor issues:
- The respective modes also have a negated form `--no-get-urlmatch`,
which is unintended.
- We have to manually handle exclusiveness of the modes.
Switch these options to instead use `OPT_CMDMODE()`, which is made
exactly for this usecase. Remove the now-unneeded check that only a
single mode is given, which is now handled by the parse-options
interface.
While at it, format optional placeholders for arguments to conform to
our style guidelines by using `[<placeholder>]`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions