midx: close multi-pack-index on repack
[gitweb.git] / builtin / repack.c
index c6a7943d5cb108dbccdfd502d799ab71a9e7e146..44965cbaa3ef3a142a89fd72403b46a9fbbc26eb 100644 (file)
@@ -431,8 +431,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                        char *fname, *fname_old;
 
                        if (!midx_cleared) {
-                               /* if we move a packfile, it will invalidated the midx */
-                               clear_midx_file(get_object_directory());
+                               clear_midx_file(the_repository);
                                midx_cleared = 1;
                        }