diff options
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/parse-options.h b/parse-options.h index 3f1cc3aee0..e8b55ea87a 100644 --- a/parse-options.h +++ b/parse-options.h @@ -223,7 +223,8 @@ extern int parse_opt_approxidate_cb(const struct option *, const char *, int); extern int parse_opt_expiry_date_cb(const struct option *, const char *, int); extern int parse_opt_color_flag_cb(const struct option *, const char *, int); extern int parse_opt_verbosity_cb(const struct option *, const char *, int); -extern int parse_opt_with_commit(const struct option *, const char *, int); +extern int parse_opt_object_name(const struct option *, const char *, int); +extern int parse_opt_commits(const struct option *, const char *, int); extern int parse_opt_tertiary(const struct option *, const char *, int); extern int parse_opt_string_list(const struct option *, const char *, int); extern int parse_opt_noop_cb(const struct option *, const char *, int); @@ -251,5 +252,12 @@ extern int parse_opt_passthru_argv(const struct option *, const char *, int); { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru } #define OPT_PASSTHRU_ARGV(s, l, v, a, h, f) \ { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru_argv } +#define _OPT_CONTAINS_OR_WITH(name, variable, help, flag) \ + { OPTION_CALLBACK, 0, name, (variable), N_("commit"), (help), \ + PARSE_OPT_LASTARG_DEFAULT | flag, \ + parse_opt_commits, (intptr_t) "HEAD" \ + } +#define OPT_CONTAINS(v, h) _OPT_CONTAINS_OR_WITH("contains", v, h, 0) +#define OPT_WITH(v, h) _OPT_CONTAINS_OR_WITH("with", v, h, PARSE_OPT_HIDDEN) #endif |