Subject: [GSoC PATCH 13/16] t3412: avoid suppressing git's exit code

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

Update t3412-rebase-root.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/t3412-rebase-root.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index 58371d8a54..f56163a73e 100755
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
@@ -171,7 +171,8 @@ test_expect_success 'set up a conflict' '
 test_expect_success 'rebase --root with conflict (first part)' '
 	git checkout -b conflict1 other &&
 	test_must_fail git rebase --root --onto main &&
-	git ls-files -u | grep "B$"
+	git ls-files -u >actual &&
+	test_grep "B$" actual
 '
 
 test_expect_success 'fix the conflict' '
@@ -198,7 +199,8 @@ test_expect_success 'rebase --root with conflict (second part)' '
 test_expect_success 'rebase -i --root with conflict (first part)' '
 	git checkout -b conflict2 other &&
 	test_must_fail git rebase -i --root --onto main &&
-	git ls-files -u | grep "B$"
+	git ls-files -u >actual &&
+	test_grep "B$" actual
 '
 
 test_expect_success 'fix the conflict' '
-- 
2.43.0