parse-options: allow git commands to invent new option types
[gitweb.git] / parse-options.c
index 632c1346c6bc6fd17a516b82771ba607961d3e4f..cd926869166fe28d4c116840be6921de7aa3cbda 100644 (file)
@@ -66,6 +66,9 @@ static int get_value(struct parse_opt_ctx_t *p,
                return opterror(opt, "takes no value", flags);
 
        switch (opt->type) {
+       case OPTION_LOWLEVEL_CALLBACK:
+               return (*(parse_opt_ll_cb *)opt->callback)(p, opt, unset);
+
        case OPTION_BIT:
                if (unset)
                        *(int *)opt->value &= ~opt->defval;