Skip to content

Commit 61f8772

Browse files
t-bGit for Windows Build Agent
authored andcommitted
t/t5571-prep-push-hook.sh: Add test with writing to stderr
The 2.53.0.rc0.windows release candidate had a regression where writing to stderr from a pre-push hook would error out. The regression was fixed in 2.53.0.rc1.windows and the test here ensures that this stays fixed. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
1 parent e18f3f7 commit 61f8772

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t5571-pre-push-hook.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,16 @@ test_expect_success 'sigpipe does not cause pre-push hook failure' '
138138
git push parent1 "refs/heads/b/*:refs/heads/b/*"
139139
'
140140

141+
test_expect_success 'can write to stderr' '
142+
test_hook --clobber pre-push <<-\EOF &&
143+
echo foo >/dev/stderr &&
144+
exit 0
145+
EOF
146+
147+
test_commit third &&
148+
echo foo >expect &&
149+
git push --quiet parent1 HEAD 2>actual &&
150+
test_cmp expect actual
151+
'
152+
141153
test_done

0 commit comments

Comments
 (0)