summaryrefslogtreecommitdiff
path: root/builtin/mv.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-09 11:01:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-09 18:24:50 (GMT)
commit1224781d6080b8b69a81526ee23b22a1587920ea (patch)
tree8b31c3cc26307351710d01d6b797d77101bb97b8 /builtin/mv.c
parent2de37349d9484fc51f45fe5dc9da56096b360221 (diff)
downloadgit-1224781d6080b8b69a81526ee23b22a1587920ea.zip
git-1224781d6080b8b69a81526ee23b22a1587920ea.tar.gz
git-1224781d6080b8b69a81526ee23b22a1587920ea.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index cf3684d..b88023a 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(),
};