summaryrefslogtreecommitdiff
path: root/t/t5411/test-0002-pre-receive-declined.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5411/test-0002-pre-receive-declined.sh')
-rw-r--r--t/t5411/test-0002-pre-receive-declined.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/t/t5411/test-0002-pre-receive-declined.sh b/t/t5411/test-0002-pre-receive-declined.sh
index e7d113a158..0c3490c9b1 100644
--- a/t/t5411/test-0002-pre-receive-declined.sh
+++ b/t/t5411/test-0002-pre-receive-declined.sh
@@ -12,20 +12,18 @@ test_expect_success "git-push is declined ($PROTOCOL)" '
test_must_fail git -C workbench push origin \
$B:refs/heads/main \
HEAD:refs/heads/next \
- >out 2>&1 &&
- make_user_friendly_and_stable_output <out >actual &&
+ >out-$test_count 2>&1 &&
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
cat >expect <<-EOF &&
To <URL/of/upstream.git>
! [remote rejected] <COMMIT-B> -> main (pre-receive hook declined)
! [remote rejected] HEAD -> next (pre-receive hook declined)
EOF
test_cmp expect actual &&
- git -C "$upstream" show-ref >out &&
- make_user_friendly_and_stable_output <out >actual &&
- cat >expect <<-EOF &&
+
+ test_cmp_refs -C "$upstream" <<-EOF
<COMMIT-A> refs/heads/main
EOF
- test_cmp expect actual
'
test_expect_success "cleanup ($PROTOCOL)" '