Subject: [GSoC PATCH 14/16] t1400: avoid suppressing git's exit code

From: Trieu Huynh <[email-masked]>
Date: Sun, 29 Mar 2026 05:02:53 +0900

Update t1400-update-ref.sh to redirect git-cmds output to a
temporary file instead of piping it directly to not hide the
exit code of git commands behind pipes, as a crash in git
might go unnoticed.

Signed-off-by: Trieu Huynh <[email-masked]>
---
 t/t1400-update-ref.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index b2858a9061..9f34359eb0 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1404,7 +1404,8 @@ test_expect_success 'handle per-worktree refs in refs/bisect' '
 		! grep refs/bisect for-each-ref.out &&
 		git update-ref refs/bisect/something HEAD &&
 		git rev-parse refs/bisect/something >../worktree-head &&
-		git for-each-ref | grep refs/bisect/something
+		git for-each-ref >actual &&
+		test_grep refs/bisect/something actual
 	) &&
 	git show-ref >actual &&
 	! grep 'refs/bisect' actual &&
-- 
2.43.0