diff options
-rw-r--r-- | builtin/gc.c | 1 | ||||
-rwxr-xr-x | t/t5510-fetch.sh | 2 |
2 files changed, 3 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]); diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index e402aee6a2..6f1450eb69 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -828,9 +828,11 @@ test_expect_success 'fetching with auto-gc does not lock up' ' test_commit test2 && ( cd auto-gc && + git config fetch.unpackLimit 1 && git config gc.autoPackLimit 1 && git config gc.autoDetach false && GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 && + test_i18ngrep "Auto packing the repository" fetch.out && ! grep "Should I try again" fetch.out ) ' |