am: 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>

Johannes Schindelin committed Jan 13, 2016 at 18:20 UTC df617b529e9ebf01cde572b8f78f4dd8bc6c010b
1 file changed +1
builtin/am.c
+1
@@ -1939,6 +1939,7 @@ next:
1939 */
1940 if (!state->rebasing) {
1941 am_destroy(state);
1942 + close_all_packs();
1943 run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
1944 }
1945 }