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>
This commit is contained in:

committed by
Junio C Hamano

parent
ff962a3f19
commit
580d5bffde
@ -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) }
|
||||
|
Reference in New Issue
Block a user