Skip to content

Commit 849988b

Browse files
trieu1162000gitster
authored andcommitted
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>
1 parent 67ad421 commit 849988b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

t/t6101-rev-parse-parents.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ test_expect_success 'setup' '
3939
'
4040

4141
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
4344
'
4445

4546
test_expect_success 'start^0' '

0 commit comments

Comments
 (0)