submodule: remove gitmodules_config
[gitweb.git] / builtin / rm.c
index b39f10fcb64f047090967dbf8b31120d2beb1b67..d91451fea122cec3923543ef78acf0c5ef4c5fa2 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) Linus Torvalds 2006
  */
 #include "builtin.h"
+#include "config.h"
 #include "lockfile.h"
 #include "dir.h"
 #include "cache-tree.h"
@@ -254,7 +255,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        struct pathspec pathspec;
        char *seen;
 
-       gitmodules_config();
        git_config(git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, builtin_rm_options,
@@ -285,7 +285,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
                list.entry[list.nr].name = xstrdup(ce->name);
                list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode);
                if (list.entry[list.nr++].is_submodule &&
-                   !is_staging_gitmodules_ok())
+                   !is_staging_gitmodules_ok(&the_index))
                        die (_("Please stage your changes to .gitmodules or stash them to proceed"));
        }