submodule: convert stage_updated_gitmodules to take a struct index_state
[gitweb.git] / submodule.c
index 95e6aff2bb74e1374d22997d1918ed190c6edafc..7097be806e237445f92223c6830ca7c6d38cb27e 100644 (file)
@@ -143,9 +143,9 @@ int remove_path_from_gitmodules(const char *path)
        return 0;
 }
 
-void stage_updated_gitmodules(void)
+void stage_updated_gitmodules(struct index_state *istate)
 {
-       if (add_file_to_cache(GITMODULES_FILE, 0))
+       if (add_file_to_index(istate, GITMODULES_FILE, 0))
                die(_("staging updated .gitmodules failed"));
 }