Subject: [GSoC PATCH 05/16] t6006: avoid suppressing git's exit code

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

Update t6006-rev-list-format.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/t6006-rev-list-format.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 581984467d..8eaed7c502 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -289,7 +289,8 @@ test_expect_success 'basic colors' '
 '
 
 test_expect_success '%S is not a placeholder for rev-list yet' '
-	git rev-list --format="%S" -1 main | grep "%S"
+	git rev-list --format="%S" -1 main >actual &&
+	test_grep "%S" actual
 '
 
 test_expect_success 'advanced colors' '
-- 
2.43.0