Merge branch 'jk/flockfile-stdio'
[gitweb.git] / builtin / gc.c
index cef38e5427773892d8eb7fc797e783f4652eadec..3e67124eaaed256f440eea2a08101e87678eee0e 100644 (file)
@@ -174,7 +174,6 @@ static int too_many_packs(void)
        if (gc_auto_pack_limit <= 0)
                return 0;
 
-       prepare_packed_git();
        for (cnt = 0, p = get_packed_git(the_repository); p; p = p->next) {
                if (!p->pack_local)
                        continue;
@@ -481,7 +480,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
                return error(FAILED_RUN, rerere.argv[0]);
 
        report_garbage = report_pack_garbage;
-       reprepare_packed_git();
+       reprepare_packed_git(the_repository);
        if (pack_garbage.nr > 0)
                clean_pack_garbage();