diff options
author | Kim Gybels <kgybels@infogroep.be> | 2018-07-09 23:37:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-10 00:16:10 +0300 |
commit | 12e73a3ce46135279cec8fc9ef0068948936e6f8 (patch) | |
tree | 0789c3cfa823c147f3f380486c3a570f3a002ce9 /builtin/gc.c | |
parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) |
gc --auto: release pack files before auto packing
Teach gc --auto to release pack files before auto packing the repository
to prevent failures when removing them.
Also teach the test 'fetching with auto-gc does not lock up' to complain
when it is no longer triggering an auto packing of the repository.
Fixes https://github.com/git-for-windows/git/issues/500
Signed-off-by: Kim Gybels <kgybels@infogroep.be>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index ccfb1ceaeb..63b62ab57c 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -612,6 +612,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) return -1; if (!repository_format_precious_objects) { + close_all_packs(the_repository->objects); if (run_command_v_opt(repack.argv, RUN_GIT_CMD)) return error(FAILED_RUN, repack.argv[0]); |