]> git.ipfire.org Git - thirdparty/git.git/commitdiff
receive-pack: release pack files before garbage-collecting
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 13 Jan 2016 17:20:26 +0000 (18:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jan 2016 19:36:28 +0000 (11:36 -0800)
Before auto-gc'ing, we need to make sure that the pack files are
released in case they need to be repacked and garbage-collected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c

index ca38131873aad1c5dd5b8001aceb39ed906b3c2d..b3104433ed6923600f3874ae564c9d04f9a9dcd2 100644 (file)
@@ -1796,6 +1796,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
                                "gc", "--auto", "--quiet", NULL,
                        };
                        int opt = RUN_GIT_CMD | RUN_COMMAND_STDOUT_TO_STDERR;
+                       close_all_packs();
                        run_command_v_opt(argv_gc_auto, opt);
                }
                if (auto_update_server_info)