t6101: avoid suppressing git's exit code

Update t6101-rev-parse-parents.sh to redirect git-rev-parse 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Trieu Huynh committed Mar 28, 2026 at 22:59 UTC 849988bc7499d11f127305a8f20a3a054eb0b0c0
1 file changed +2 -1
t/t6101-rev-parse-parents.sh
+2 -1
@@ -39,7 +39,8 @@ test_expect_success 'setup' '
39 '
40
41 test_expect_success 'start is valid' '
42 - git rev-parse start | grep "^$OID_REGEX$"
42 + git rev-parse start >actual &&
43 + test_grep "^$OID_REGEX$" actual
44 '
45
46 test_expect_success 'start^0' '