Files
git/builtin
Ævar Arnfjörð Bjarmason d35d03cf93 help: simplify by moving to OPT_CMDMODE()
As preceding commits have incrementally established all of the --all,
--guides, --config and hidden --config-for-completion options are
mutually exclusive. So let's use OPT_CMDMODE() to parse the
command-line instead, and take advantage of its conflicting options
detection.

This is the first command with a hidden CMDMODE, so let's introduce a
OPT_CMDMODE_F() macro to go along with OPT_CMDMODE().

I think this makes the usage information that we emit slightly worse,
e.g. before we'd emit:

    $ git help --all --config
    fatal: --config and --all cannot be combined

    usage: git help [-a|--all] [--[no-]verbose]]
             [[-i|--info] [-m|--man] [-w|--web]] [<command>]
       or: git help [-g|--guides]
       or: git help [-c|--config]
    [...]
    $

And now:

    $ git help --all --config
    error: option `config' is incompatible with --all
    $

But improving that is a general topic for parse-options.c improvement,
i.e. we should probably emit the full usage in that case.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-23 10:30:43 -07:00
..
2021-09-10 11:46:29 -07:00
2021-02-25 16:43:29 -08:00
2021-06-04 07:50:26 +09:00
2021-09-10 11:46:29 -07:00
2021-02-25 16:43:30 -08:00
2021-02-25 16:43:30 -08:00
2021-07-28 13:17:59 -07:00
2021-09-10 11:46:29 -07:00
2021-05-07 12:47:41 +09:00
2021-06-02 07:34:27 +09:00
2021-09-10 11:46:28 -07:00
2021-04-14 13:47:21 -07:00
2021-09-10 11:46:29 -07:00
2021-07-22 11:54:30 -07:00
2021-04-07 16:54:08 -07:00
2021-01-25 14:19:19 -08:00
2021-07-30 12:14:27 -07:00
2021-07-16 17:42:53 -07:00