merge: release pack files before garbage-collecting
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 13 Jan 2016 17:20:21 +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/merge.c
index 15bf95b3ac6c54727992103b1943515a1da32ff4..b98a3489bf24c0726b3847704e7ec0b658a79e51 100644 (file)
@@ -404,6 +404,7 @@ static void finish(struct commit *head_commit,
                         * We ignore errors in 'gc --auto', since the
                         * user should see them.
                         */
+                       close_all_packs();
                        run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
                }
        }