submodule: fixup nested submodules after moving the submodule
[gitweb.git] / unpack-trees.c
index e6a15bbe44f24555a8edb9461c2af553de70cba0..3a6a28e794cd311d0e39068840e0cb70d53ceaf5 100644 (file)
@@ -290,7 +290,7 @@ static void load_gitmodules_file(struct index_state *index,
                if (!state && ce->ce_flags & CE_WT_REMOVE) {
                        repo_read_gitmodules(the_repository);
                } else if (state && (ce->ce_flags & CE_UPDATE)) {
-                       submodule_free();
+                       submodule_free(the_repository);
                        checkout_entry(ce, state, NULL);
                        repo_read_gitmodules(the_repository);
                }