aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-08 14:29:12 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-08 14:29:13 -0700
commit8fdfaf0b2f882dea825f3f9abe92af13c45432a5 (patch)
tree7260a561a6c6f63be1205999fd8c9a0f5ea01c67 /Documentation
parent11cfcc579a47c8873bccde835a39b3589c1e78ab (diff)
parentc3f6b853bfafa2046f2c6b0b9661d284436900b6 (diff)
downloadgit-8fdfaf0b2f882dea825f3f9abe92af13c45432a5.tar.gz
git-8fdfaf0b2f882dea825f3f9abe92af13c45432a5.tar.xz
Merge branch 'pb/opt-cmdmode-doc'
Minor API documentation update. * pb/opt-cmdmode-doc: api-parse-options.txt: document OPT_CMDMODE()
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/technical/api-parse-options.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index 5f0757dcc..695bd4bf4 100644
--- a/Documentation/technical/api-parse-options.txt
+++ b/Documentation/technical/api-parse-options.txt
@@ -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()`.