summaryrefslogtreecommitdiff
path: root/test-parse-options.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-05-07 19:44:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-09 07:28:53 (GMT)
commit2f4b97f91071f5060bf2da482cf8b0d70486d808 (patch)
treefabe7f74fafa1410676c5d15cac2de3fa93ef1ef /test-parse-options.c
parent5a0e4a2a326966aabb566164a7571291e34adabd (diff)
downloadgit-2f4b97f91071f5060bf2da482cf8b0d70486d808.zip
git-2f4b97f91071f5060bf2da482cf8b0d70486d808.tar.gz
git-2f4b97f91071f5060bf2da482cf8b0d70486d808.tar.bz2
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 <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-parse-options.c')
-rw-r--r--test-parse-options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test-parse-options.c b/test-parse-options.c
index 61d2c39..eddc026 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -29,6 +29,7 @@ int main(int argc, const char **argv)
OPT_BOOLEAN('b', "boolean", &boolean, "get a boolean"),
OPT_BIT('4', "or4", &boolean,
"bitwise-or boolean with ...0100", 4),
+ OPT_NEGBIT(0, "neg-or4", &boolean, "same as --no-or4", 4),
OPT_GROUP(""),
OPT_INTEGER('i', "integer", &integer, "get a integer"),
OPT_INTEGER('j', NULL, &integer, "get a integer, too"),