summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-01-13 18:20:26 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-13 11:36:28 -0800
commitd5621020c1e0edfa998cb5c5e80cdf47f36ffb1a (patch)
treebc77244a50913d9e1a747c6ebe301e73267ebec7 /builtin/receive-pack.c
parentdcacb1b2ee42d3cc20e4720134f18ab5ba267f3a (diff)
downloadgit-d5621020c1e0edfa998cb5c5e80cdf47f36ffb1a.tar.gz
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 <johannes.schindelin@gmx.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c1
1 files changed, 1 insertions, 0 deletions
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)