summaryrefslogtreecommitdiff
path: root/t/t5571-pre-push-hook.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-12-01 17:32:38 -0500
committerLibravatar Jeff King <peff@peff.net>2015-12-01 17:32:38 -0500
commit40fdcc535783f5c64e6aba9f4b2d2c8997c55a8d (patch)
tree95a2da48eec35b7bfacf36beb80b05dcea84d6e1 /t/t5571-pre-push-hook.sh
parentMerge branch 'fp/subtree-todo-update' (diff)
parentMerge branch 'eg/p4-submit-catch-failure' into maint (diff)
downloadtgif-40fdcc535783f5c64e6aba9f4b2d2c8997c55a8d.tar.xz
Merge branch 'maint'
* maint: http: treat config options sslCAPath and sslCAInfo as paths Documentation/diff: give --word-diff-regex=. example filter-branch: deal with object name vs. pathname ambiguity in tree-filter check-ignore: correct documentation about output git-p4: clean up after p4 submit failure git-p4: work with a detached head git-p4: add option to system() to return subshell status git-p4: add failing test for submit from detached head remote-http(s): support SOCKS proxies t5813: avoid creating urls that break on cygwin Escape Git's exec path in contrib/rerere-train.sh script allow hooks to ignore their standard input stream rebase-i-exec: Allow space in SHELL_PATH Documentation: make environment variable formatting more consistent
Diffstat (limited to 't/t5571-pre-push-hook.sh')
-rwxr-xr-xt/t5571-pre-push-hook.sh33
1 files changed, 15 insertions, 18 deletions
diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh
index 6f9916a390..ba975bb355 100755
--- a/t/t5571-pre-push-hook.sh
+++ b/t/t5571-pre-push-hook.sh
@@ -109,23 +109,20 @@ test_expect_success 'push to URL' '
diff expected actual
'
-# Test that filling pipe buffers doesn't cause failure
-# Too slow to leave enabled for general use
-if false
-then
- printf 'parent1\nrepo1\n' >expected
- nr=1000
- while test $nr -lt 2000
- do
- nr=$(( $nr + 1 ))
- git branch b/$nr $COMMIT3
- echo "refs/heads/b/$nr $COMMIT3 refs/heads/b/$nr $_z40" >>expected
- done
-
- test_expect_success 'push many refs' '
- git push parent1 "refs/heads/b/*:refs/heads/b/*" &&
- diff expected actual
- '
-fi
+test_expect_success 'set up many-ref tests' '
+ {
+ nr=1000
+ while test $nr -lt 2000
+ do
+ nr=$(( $nr + 1 ))
+ echo "create refs/heads/b/$nr $COMMIT3"
+ done
+ } | git update-ref --stdin
+'
+
+test_expect_success 'sigpipe does not cause pre-push hook failure' '
+ echo "exit 0" | write_script "$HOOK" &&
+ git push parent1 "refs/heads/b/*:refs/heads/b/*"
+'
test_done