t3200: verify "branch --list" sanity when rebasing from detached HEAD
[gitweb.git] / builtin / submodule--helper.c
index b1daca995f2f46ceb15148b609c4a89ccaa13de4..6ba8587b6d3b7b8b1bc7a96451916c60210b093b 100644 (file)
@@ -1019,7 +1019,7 @@ static int module_deinit(int argc, const char **argv, const char *prefix)
 
        struct option module_deinit_options[] = {
                OPT__QUIET(&quiet, N_("Suppress submodule status output")),
-               OPT__FORCE(&force, N_("Remove submodule working trees even if they contain local changes")),
+               OPT__FORCE(&force, N_("Remove submodule working trees even if they contain local changes"), 0),
                OPT_BOOL(0, "all", &all, N_("Unregister all submodules")),
                OPT_END()
        };
@@ -1042,7 +1042,7 @@ static int module_deinit(int argc, const char **argv, const char *prefix)
                die(_("Use '--all' if you really want to deinitialize all submodules"));
 
        if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0)
-               BUG("module_list_compute should not choke on empty pathspec");
+               return 1;
 
        info.prefix = prefix;
        if (quiet)