aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:13 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:13 -0800
commitf748e6916749e35fc54c24eb6e02e1182c62a052 (patch)
tree48c857eefa9b5c985feab4fcbcd38ed26c16a2fd /t
parentb11a3badf2353d69a244348991ff35f823f6b967 (diff)
parentd5621020c1e0edfa998cb5c5e80cdf47f36ffb1a (diff)
downloadgit-f748e6916749e35fc54c24eb6e02e1182c62a052.tar.gz
git-f748e6916749e35fc54c24eb6e02e1182c62a052.tar.xz
Merge branch 'js/close-packs-before-gc' into maint
Many codepaths that run "gc --auto" before exiting kept packfiles mapped and left the file descriptors to them open, which was not friendly to systems that cannot remove files that are open. They now close the packs before doing so. * js/close-packs-before-gc: receive-pack: release pack files before garbage-collecting merge: release pack files before garbage-collecting am: release pack files before garbage-collecting fetch: release pack files before garbage-collecting
Diffstat (limited to 't')
-rwxr-xr-xt/t5510-fetch.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 0ba9db088..e3ee4bd70 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -708,4 +708,17 @@ test_expect_success 'fetching a one-level ref works' '
)
'
+test_expect_success 'fetching with auto-gc does not lock up' '
+ write_script askyesno <<-\EOF &&
+ echo "$*" &&
+ false
+ EOF
+ git clone "file://$D" auto-gc &&
+ test_commit test2 &&
+ cd auto-gc &&
+ git config gc.autoPackLimit 1 &&
+ GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
+ ! grep "Should I try again" fetch.out
+'
+
test_done