diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 18:01:42 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 10:24:50 -0800 |
commit | 1224781d6080b8b69a81526ee23b22a1587920ea (patch) | |
tree | 8b31c3cc26307351710d01d6b797d77101bb97b8 /parse-options.h | |
parent | 2de37349d9484fc51f45fe5dc9da56096b360221 (diff) | |
download | git-1224781d6080b8b69a81526ee23b22a1587920ea.tar.gz |
parse-options: let OPT__FORCE take optional flags argument
--force option is most likely hidden from command line completion for
safety reasons. This is done by adding an extra flag
PARSE_OPT_NOCOMPLETE. Update OPT__FORCE() to accept additional
flags. Actual flag change comes later depending on individual
commands.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-options.h b/parse-options.h index 05a6839019..3c32401736 100644 --- a/parse-options.h +++ b/parse-options.h @@ -248,7 +248,7 @@ extern int parse_opt_passthru_argv(const struct option *, const char *, int); { OPTION_CALLBACK, 'q', "quiet", (var), NULL, N_("be more quiet"), \ PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 } #define OPT__DRY_RUN(var, h) OPT_BOOL('n', "dry-run", (var), (h)) -#define OPT__FORCE(var, h) OPT_COUNTUP('f', "force", (var), (h)) +#define OPT__FORCE(var, h, f) OPT_COUNTUP_F('f', "force", (var), (h), (f)) #define OPT__ABBREV(var) \ { OPTION_CALLBACK, 0, "abbrev", (var), N_("n"), \ N_("use <n> digits to display SHA-1s"), \ |