From: Trieu Huynh Date: Sat, 28 Mar 2026 20:02:52 GMT Subject: [GSoC PATCH 13/16] t3412: avoid suppressing git's exit code Message-ID: <20260328200255.247759-14-vikingtc4@gmail.com> In-Reply-To: <20260328200255.247759-1-vikingtc4@gmail.com> Update t3412-rebase-root.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/t3412-rebase-root.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh index 58371d8a54..f56163a73e 100755 --- a/t/t3412-rebase-root.sh +++ b/t/t3412-rebase-root.sh @@ -171,7 +171,8 @@ test_expect_success 'set up a conflict' ' test_expect_success 'rebase --root with conflict (first part)' ' git checkout -b conflict1 other && test_must_fail git rebase --root --onto main && - git ls-files -u | grep "B$" + git ls-files -u >actual && + test_grep "B$" actual ' test_expect_success 'fix the conflict' ' @@ -198,7 +199,8 @@ test_expect_success 'rebase --root with conflict (second part)' ' test_expect_success 'rebase -i --root with conflict (first part)' ' git checkout -b conflict2 other && test_must_fail git rebase -i --root --onto main && - git ls-files -u | grep "B$" + git ls-files -u >actual && + test_grep "B$" actual ' test_expect_success 'fix the conflict' ' -- 2.43.0