Merge branch 'jc/am-i-v-fix' into maint
[gitweb.git] / t / t5510-fetch.sh
index 0ba9db08847255d28e3e185d18b68703fb0755dc..e3ee4bd700c3e72479ce1c7a4d8b1333a35a8473 100755 (executable)
@@ -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