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>

Pranit Bauva committed Mar 25, 2016 at 18:58 UTC c3f6b853bfafa2046f2c6b0b9661d284436900b6
1 file changed +7
Documentation/technical/api-parse-options.txt
+7
@@ -231,6 +231,13 @@ There are some macros to easily define options:
231 pass the command-line option, which can be specified multiple times,
232 to another command.
233
234 +`OPT_CMDMODE(short, long, &int_var, description, enum_val)`::
235 + Define an "operation mode" option, only one of which in the same
236 + group of "operating mode" options that share the same `int_var`
237 + can be given by the user. `enum_val` is set to `int_var` when the
238 + option is used, but an error is reported if other "operating mode"
239 + option has already set its value to the same `int_var`.
240 +
241
242 The last element of the array must be `OPT_END()`.
243