Merge branch 'js/mingw-unc-path-w-backslashes'
[gitweb.git] / builtin / gc.c
index 871a56f1c5a5804db9363b117ae3891ea832bc5f..020f725acc40f413c49f812ea0e6aac0153d097c 100644 (file)
@@ -317,7 +317,7 @@ static void add_repack_all_option(struct string_list *keep_pack)
 
 static void add_repack_incremental_option(void)
 {
-       argv_array_push(&repack, "--no-write-bitmap-index");
+       argv_array_push(&repack, "--no-write-bitmap-index");
 }
 
 static int need_to_gc(void)
@@ -659,8 +659,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
 
        report_garbage = report_pack_garbage;
        reprepare_packed_git(the_repository);
-       if (pack_garbage.nr > 0)
+       if (pack_garbage.nr > 0) {
+               close_all_packs(the_repository->objects);
                clean_pack_garbage();
+       }
 
        if (gc_write_commit_graph)
                write_commit_graph_reachable(get_object_directory(), 0,