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