From 541d54bc0121b2f4a87a1c77e6619e2086ccde28 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Mon, 26 Jan 2026 19:02:44 +0100 Subject: [PATCH] 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 --- t/t5571-pre-push-hook.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh index a11b20e378..25b8d50c94 100755 --- a/t/t5571-pre-push-hook.sh +++ b/t/t5571-pre-push-hook.sh @@ -138,4 +138,16 @@ test_expect_success 'sigpipe does not cause pre-push hook failure' ' git push parent1 "refs/heads/b/*:refs/heads/b/*" ' +test_expect_success 'can write to stderr' ' + test_hook --clobber pre-push <<-\EOF && + echo foo >/dev/stderr && + exit 0 + EOF + + test_commit third && + echo foo >expect && + git push --quiet parent1 HEAD 2>actual && + test_cmp expect actual +' + test_done