From: Trieu Huynh Date: Sat, 28 Mar 2026 20:02:49 GMT Subject: [GSoC PATCH 10/16] t4039: avoid suppressing git's exit code Message-ID: <20260328200255.247759-11-vikingtc4@gmail.com> In-Reply-To: <20260328200255.247759-1-vikingtc4@gmail.com> 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 --- 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