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 /builtin/rm.c | |
parent | parse-options: add OPT_xxx_F() variants (diff) | |
download | tgif-1224781d6080b8b69a81526ee23b22a1587920ea.tar.xz |
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 'builtin/rm.c')
-rw-r--r-- | builtin/rm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rm.c b/builtin/rm.c index 4a2fcca27b..6e0c7f5ac6 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -242,7 +242,7 @@ static struct option builtin_rm_options[] = { OPT__DRY_RUN(&show_only, N_("dry run")), OPT__QUIET(&quiet, N_("do not list removed files")), OPT_BOOL( 0 , "cached", &index_only, N_("only remove from the index")), - OPT__FORCE(&force, N_("override the up-to-date check")), + OPT__FORCE(&force, N_("override the up-to-date check"), 0), OPT_BOOL('r', NULL, &recursive, N_("allow recursive removal")), OPT_BOOL( 0 , "ignore-unmatch", &ignore_unmatch, N_("exit with a zero status even if nothing matched")), |