aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrieu Huynh <vikingtc4@gmail.com>2026-03-28 22:59:35 +0900
committerJunio C Hamano <gitster@pobox.com>2026-03-28 11:40:13 -0700
commit849988bc7499d11f127305a8f20a3a054eb0b0c0 (patch)
treef58d6221ee057bc1e34607a730f7d5bc605b28fb
parent67ad42147a7acc2af6074753ebd03d904476118f (diff)
downloadgit-849988bc7499d11f127305a8f20a3a054eb0b0c0.tar.xz
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>
-rwxr-xr-xt/t6101-rev-parse-parents.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 5f55ab98d3..7281889717 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -39,7 +39,8 @@ test_expect_success 'setup' '
'
test_expect_success 'start is valid' '
- git rev-parse start | grep "^$OID_REGEX$"
+ git rev-parse start >actual &&
+ test_grep "^$OID_REGEX$" actual
'
test_expect_success 'start^0' '