path: root/Documentation/technical/api-parse-options.txt
diff options
authorRené Scharfe <>2009-05-07 19:44:17 (GMT)
committerJunio C Hamano <>2009-05-09 07:28:53 (GMT)
commit2f4b97f91071f5060bf2da482cf8b0d70486d808 (patch)
treefabe7f74fafa1410676c5d15cac2de3fa93ef1ef /Documentation/technical/api-parse-options.txt
parent5a0e4a2a326966aabb566164a7571291e34adabd (diff)
parseopt: add OPT_NEGBIT
Add OPTION_NEGBIT and OPT_NEGBIT, mirroring OPTION_BIT and OPT_BIT. OPT_NEGBIT can be used together with OPT_BIT to define two options that cancel each other out. Note: this patch removes the reminder from the test script because it adds a test for --no-or4 and there already was one for --or4. Signed-off-by: Rene Scharfe <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/technical/api-parse-options.txt')
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index e66ca9f..794194b 100644
--- a/Documentation/technical/api-parse-options.txt
+++ b/Documentation/technical/api-parse-options.txt
@@ -137,6 +137,10 @@ There are some macros to easily define options:
Introduce a boolean option.
If used, `int_var` is bitwise-ored with `mask`.
+`OPT_NEGBIT(short, long, &int_var, description, mask)`::
+ Introduce a boolean option.
+ If used, `int_var` is bitwise-anded with the inverted `mask`.
`OPT_SET_INT(short, long, &int_var, description, integer)`::
Introduce a boolean option.
If used, set `int_var` to `integer`.