[GSoC PATCH 14/16] t1400: avoid suppressing git's exit code
- From
Trieu Huynh <vikingtc4@gmail.com>
- Date
- Mar 28, 2026, 20:02 UTC
- Message-ID
- <20260328200255.247759-15-vikingtc4@gmail.com>
- In-Reply-To
- <20260328200255.247759-1-vikingtc4@gmail.com>
Update t1400-update-ref.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/t1400-update-ref.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index b2858a9061..9f34359eb0 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -1404,7 +1404,8 @@ test_expect_success 'handle per-worktree refs in refs/bisect' ' ! grep refs/bisect for-each-ref.out && git update-ref refs/bisect/something HEAD && git rev-parse refs/bisect/something >../worktree-head && - git for-each-ref | grep refs/bisect/something + git for-each-ref >actual && + test_grep refs/bisect/something actual ) && git show-ref >actual && ! grep 'refs/bisect' actual &&
-- 2.43.0