From: Johannes Schindelin Date: Wed, 13 Jan 2016 17:20:26 +0000 (+0100) Subject: receive-pack: release pack files before garbage-collecting X-Git-Tag: v2.7.1~18^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5621020c1e0edfa998cb5c5e80cdf47f36ffb1a;p=git receive-pack: release pack files before garbage-collecting 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 Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index ca38131873..b3104433ed 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -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)