summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2012-01-03 13:46:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-01-03 20:13:28 (GMT)
commit54440e154f33678a80ea9f77085730b81a5e9446 (patch)
treeb78597fad5116212617d606beab521ca58ed011b /t
parentf3f778df6900881a7bac409c927931c32b82bcb5 (diff)
downloadgit-54440e154f33678a80ea9f77085730b81a5e9446.zip
git-54440e154f33678a80ea9f77085730b81a5e9446.tar.gz
git-54440e154f33678a80ea9f77085730b81a5e9446.tar.bz2
fix hang in git fetch if pointed at a 0 length bundle
git-repo if interupted at the exact wrong time will generate zero length bundles- literal empty files. git-repo is wrong here, but git fetch shouldn't effectively spin loop if pointed at a zero length bundle. Signed-off-by: Brian Harring <ferringb@chromium.org> Helped-by: Johannes Sixt Helped-by: Nguyen Thai Ngoc Duy Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5704-bundle.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5704-bundle.sh b/t/t5704-bundle.sh
index 728ccd8..4ae127d 100755
--- a/t/t5704-bundle.sh
+++ b/t/t5704-bundle.sh
@@ -53,4 +53,10 @@ test_expect_failure 'bundle --stdin <rev-list options>' '
'
+test_expect_success 'empty bundle file is rejected' '
+
+ >empty-bundle && test_must_fail git fetch empty-bundle
+
+'
+
test_done