[GSoC PATCH 09/16] t4140: avoid suppressing git's exit code
- From
Trieu Huynh <vikingtc4@gmail.com>
- Date
- Mar 28, 2026, 20:02 UTC
- Message-ID
- <20260328200255.247759-10-vikingtc4@gmail.com>
- In-Reply-To
- <20260328200255.247759-1-vikingtc4@gmail.com>
Update t4140-apply-ita.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 <vikingtc4@gmail.com> --- t/t4140-apply-ita.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t4140-apply-ita.sh b/t/t4140-apply-ita.sh index 0b11a8aef4..15eef0a2ba 100755 --- a/t/t4140-apply-ita.sh +++ b/t/t4140-apply-ita.sh @@ -79,7 +79,8 @@ test_expect_success 'apply complex patch with -N' ' git apply -N complex-patch && git ls-files --stage --error-unmatch test-file && - git diff | grep "a/committed-file" + git diff >actual && + test_grep "a/committed-file" actual ' test_done
-- 2.43.0