diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 14:01:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 21:24:50 +0300 |
commit | 1224781d6080b8b69a81526ee23b22a1587920ea (patch) | |
tree | 8b31c3cc26307351710d01d6b797d77101bb97b8 /builtin/mv.c | |
parent | 2de37349d9484fc51f45fe5dc9da56096b360221 (diff) |
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/mv.c')
-rw-r--r-- | builtin/mv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/mv.c b/builtin/mv.c index cf3684d907..b88023a733 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -122,7 +122,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix) struct option builtin_mv_options[] = { OPT__VERBOSE(&verbose, N_("be verbose")), OPT__DRY_RUN(&show_only, N_("dry run")), - OPT__FORCE(&force, N_("force move/rename even if target exists")), + OPT__FORCE(&force, N_("force move/rename even if target exists"), 0), OPT_BOOL('k', NULL, &ignore_errors, N_("skip move/rename errors")), OPT_END(), }; |