fetch: release pack files before garbage-collecting
[gitweb.git] / builtin / fetch.c
index c85f3471d4b53ce7db7662b5531ddebe5513b7b0..5b58001a982d0c0361c8693d05c609fd0b5fcd9c 100644 (file)
@@ -1221,6 +1221,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
        list.strdup_strings = 1;
        string_list_clear(&list, 0);
 
+       close_all_packs();
+
        argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL);
        if (verbosity < 0)
                argv_array_push(&argv_gc_auto, "--quiet");