summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-26 14:39:44 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-26 14:39:44 -0700
commitbdab1bca53b71fd6bd2420d1e007eb2ef7b8abc3 (patch)
tree47cf14e920aad5a552426fd0b3b4c024f3d31cf5 /t
parentc0f5f311dbb219c88a2da4a3029f9c7d9c554753 (diff)
parentec7dbd145bd8ea27d958dcb16e19b5f0ef3fd643 (diff)
downloadgit-bdab1bca53b71fd6bd2420d1e007eb2ef7b8abc3.tar.gz
Merge branch 'jc/ignore-sigpipe-while-running-hooks'
pre- and post-receive hooks are no longer required to read all their inputs. * jc/ignore-sigpipe-while-running-hooks: receive-pack: allow hooks to ignore its standard input stream
Diffstat (limited to 't')
-rwxr-xr-xt/t5401-update-hooks.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 17bcb0b040..7f278d8ce9 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -135,4 +135,17 @@ test_expect_success 'send-pack stderr contains hook messages' '
test_cmp expect actual
'
+test_expect_success 'pre-receive hook that forgets to read its input' '
+ write_script victim.git/hooks/pre-receive <<-\EOF &&
+ exit 0
+ EOF
+ rm -f victim.git/hooks/update victim.git/hooks/post-update &&
+
+ for v in $(test_seq 100 999)
+ do
+ git branch branch_$v master || return
+ done &&
+ git push ./victim.git "+refs/heads/*:refs/heads/*"
+'
+
test_done