1
0
mirror of https://github.com/git/git.git synced 2024-10-22 01:49:40 +02:00

api-parse-options.txt: document OPT_CMDMODE()

OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively
notice when multiple "operation mode" options that specify mutually
incompatible operation modes are given.

Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pranit Bauva 2016-03-25 18:58:58 +00:00 committed by Junio C Hamano
parent e46579643d
commit c3f6b853bf

@ -231,6 +231,13 @@ There are some macros to easily define options:
pass the command-line option, which can be specified multiple times,
to another command.
`OPT_CMDMODE(short, long, &int_var, description, enum_val)`::
Define an "operation mode" option, only one of which in the same
group of "operating mode" options that share the same `int_var`
can be given by the user. `enum_val` is set to `int_var` when the
option is used, but an error is reported if other "operating mode"
option has already set its value to the same `int_var`.
The last element of the array must be `OPT_END()`.