submodule: merge repo_read_gitmodules and gitmodules_config
[gitweb.git] / builtin / rm.c
index 52826d137935ca6698006258ebdb8b207f7161df..4057e73fa04bee9fce10911955c8a43d118ef573 100644 (file)
@@ -286,7 +286,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"));
        }