aboutsummaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2008-03-02 11:35:56 +0100
committerJunio C Hamano <gitster@pobox.com>2008-03-02 14:07:47 -0800
commit580d5bffdea56dfae1e745dbda94f326bb161274 (patch)
treed5a51ee13a14c7944f196395aa2f2d9c302625ef /parse-options.h
parentff962a3f1900966d008d6f9eaf32095c42322b9d (diff)
downloadgit-580d5bffdea56dfae1e745dbda94f326bb161274.tar.gz
git-580d5bffdea56dfae1e745dbda94f326bb161274.tar.xz
parse-options: new option type to treat an option-like parameter as an argument.
This is meant to be used to keep --not and --all during revision parsing. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h
index 102ac31fb..dc0807834 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -4,6 +4,7 @@
enum parse_opt_type {
/* special types */
OPTION_END,
+ OPTION_ARGUMENT,
OPTION_GROUP,
/* options with no arguments */
OPTION_BIT,
@@ -84,6 +85,7 @@ struct option {
};
#define OPT_END() { OPTION_END }
+#define OPT_ARGUMENT(l, h) { OPTION_ARGUMENT, 0, (l), NULL, NULL, (h) }
#define OPT_GROUP(h) { OPTION_GROUP, 0, NULL, NULL, NULL, (h) }
#define OPT_BIT(s, l, v, h, b) { OPTION_BIT, (s), (l), (v), NULL, (h), 0, NULL, (b) }
#define OPT_BOOLEAN(s, l, v, h) { OPTION_BOOLEAN, (s), (l), (v), NULL, (h) }