Subject: [GSoC PATCH 10/16] t4039: avoid suppressing git's exit code

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

Update t4039-diff-assume-unchanged.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/t4039-diff-assume-unchanged.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t4039-diff-assume-unchanged.sh b/t/t4039-diff-assume-unchanged.sh
index 0eb0314a8b..9eb3c3f04d 100755
--- a/t/t4039-diff-assume-unchanged.sh
+++ b/t/t4039-diff-assume-unchanged.sh
@@ -21,7 +21,8 @@ test_expect_success 'setup' '
 '
 
 test_expect_success 'diff-index does not examine assume-unchanged entries' '
-	git diff-index HEAD^ -- one | grep -q $blob
+	git diff-index HEAD^ -- one >actual &&
+	test_grep "$blob" actual
 '
 
 test_expect_success 'diff-files does not examine assume-unchanged entries' '
-- 
2.43.0