parse-options: let OPT__FORCE take optional flags argument
[gitweb.git] / builtin / mv.c
index ffdd5f01a190b99407d1019972e3198c42b7194c..b88023a733ff263f13b12bb0e618f15da0f74a11 100644 (file)
@@ -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(),
        };
@@ -291,7 +291,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
        }
 
        if (gitmodules_modified)
-               stage_updated_gitmodules();
+               stage_updated_gitmodules(&the_index);
 
        if (active_cache_changed &&
            write_locked_index(&the_index, &lock_file, COMMIT_LOCK))