Æ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-08-25 12:07:52 -07:00
2020-07-30 19:18:06 -07:00
2018-08-13 14:14:44 -07:00
2021-08-25 14:39:08 -07:00
2021-07-13 15:20:20 -07:00
2021-02-25 16:43:29 -08:00
2021-08-27 15:11:18 -07:00
2021-08-25 14:39:08 -07:00
2021-07-06 12:10:17 -07:00
2021-06-04 07:50:26 +09:00
2019-01-24 11:55:06 -08:00
2021-07-01 12:32:22 -07:00
2021-01-12 14:04:42 -08:00
2017-11-06 14:24:28 +09:00
2021-06-15 12:07:56 +09:00
2021-05-16 21:05:23 +09:00
2021-09-10 11:46:29 -07:00
2021-07-01 12:32:22 -07:00
2021-09-10 11:46:29 -07:00
2021-08-26 14:36:27 -07:00
2021-08-30 17:06:18 -07:00
2021-08-25 14:39:08 -07:00
2021-09-10 11:46:29 -07:00
2021-04-19 14:16:59 -07:00
2018-11-13 14:22:02 +09:00
2021-03-15 14:32:51 -07:00
2021-07-26 12:17:16 -07:00
2021-07-26 12:17:16 -07:00
2020-10-16 12:30:45 -07:00
2021-04-27 16:31:39 +09:00
2021-02-25 16:43:30 -08:00
2021-05-21 09:24:14 +09:00
2021-02-25 16:43:30 -08:00
2021-07-28 13:17:59 -07:00
2021-07-08 13:15:04 -07:00
2020-09-30 12:53:47 -07:00
2021-09-10 11:46:27 -07:00
2021-04-27 16:31:38 +09:00
2021-02-05 13:49:54 -08:00
2021-09-10 11:46:29 -07:00
2020-03-24 15:04:43 -07:00
2021-05-07 12:47:41 +09:00
2021-07-26 12:19:20 -07:00
2021-06-02 07:34:27 +09:00
2021-09-10 11:46:28 -07:00
2019-04-01 11:57:39 +09:00
2021-07-01 12:32:22 -07:00
2021-08-25 14:39:08 -07:00
2021-09-23 10:30:43 -07:00
2021-08-25 14:39:08 -07:00
2021-05-25 16:21:20 +09:00
2020-04-28 10:47:10 -07:00
2021-08-05 09:37:28 -07:00
2021-07-01 12:32:22 -07:00
2021-08-24 14:47:07 -07:00
2021-03-20 16:09:26 -07:00
2021-05-10 15:06:22 +09:00
2021-08-25 14:39:08 -07:00
2020-02-11 09:59:39 -08:00
2018-11-06 12:56:29 +09:00
2021-04-14 13:47:21 -07:00
2021-06-09 09:15:58 +09:00
2019-08-19 10:08:03 -07:00
2021-05-11 12:47:31 +09:00
2021-09-10 11:46:29 -07:00
2021-03-28 19:03:10 -07:00
2021-06-09 09:15:58 +09:00
2021-08-30 17:06:18 -07:00
2021-07-26 12:19:20 -07:00
2021-01-28 12:03:26 -08:00
2021-08-25 14:39:08 -07:00
2021-08-29 23:25:43 -07:00
2021-04-27 16:31:38 +09:00
2019-12-09 12:26:40 -08:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2021-07-22 11:54:30 -07:00
2021-08-25 12:07:52 -07:00
2021-03-29 14:06:08 -07:00
2020-04-28 10:47:10 -07:00
2021-09-10 11:46:19 -07:00
2021-07-12 12:09:53 -07:00
2021-02-11 09:21:52 -08:00
2020-07-28 15:02:18 -07:00
2021-04-07 16:54:08 -07:00
2021-04-28 13:36:13 +09:00
2021-08-25 12:07:52 -07:00
2021-05-11 12:47:31 +09:00
2021-08-25 12:07:52 -07:00
2021-07-12 10:12:31 -07:00
2021-05-17 18:39:53 +09:00
2021-08-05 09:37:28 -07:00
2021-08-25 12:07:52 -07:00
2021-07-15 11:58:52 -07:00
2021-01-25 14:19:19 -08:00
2021-08-27 14:12:15 -07:00
2021-04-27 16:31:39 +09:00
2021-01-21 15:51:31 -08:00
2021-07-30 12:14:27 -07:00
2021-07-16 17:42:53 -07:00
2021-08-25 12:07:52 -07:00
2021-03-14 15:57:59 -07:00
2021-09-08 13:30:32 -07:00
2021-04-27 16:31:39 +09:00
2021-08-25 14:39:08 -07:00
2020-11-16 13:44:01 -08:00
2018-02-09 10:24:50 -08:00
2020-07-30 19:18:06 -07:00
2019-05-13 14:22:53 +09:00
2017-06-15 12:56:22 -07:00
2019-07-31 14:38:56 -07:00
2020-08-11 18:04:11 -07:00
2019-06-19 08:19:21 -07:00
2021-07-15 13:30:59 -07:00
2019-05-13 14:22:53 +09:00