Sync with 2.7.2
[gitweb.git] / builtin / fetch.c
index 33f04c1b4a3a75c7840e26ed8334b015aa84a099..8e742135f049c2792bfc5a20299dac88518929cc 100644 (file)
@@ -1225,6 +1225,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");