Skip to content

Commit 40225ba

Browse files
committed
Merge branch 'gt/t0024-style-fixes'
Coding style fix. * gt/t0024-style-fixes: t0024: style fix t0024: avoid losing exit status to pipes
2 parents d3bf8d3 + 5ba95e0 commit 40225ba

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

t/t0024-crlf-archive.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test_expect_success setup '
99
1010
git config core.autocrlf true &&
1111
12-
printf "CRLF line ending\r\nAnd another\r\n" > sample &&
12+
printf "CRLF line ending\r\nAnd another\r\n" >sample &&
1313
git add sample &&
1414
1515
test_tick &&
@@ -19,8 +19,9 @@ test_expect_success setup '
1919

2020
test_expect_success 'tar archive' '
2121
22-
git archive --format=tar HEAD |
23-
( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
22+
git archive --format=tar HEAD >test.tar &&
23+
mkdir untarred &&
24+
"$TAR" xf test.tar -C untarred &&
2425
2526
test_cmp sample untarred/sample
2627
@@ -30,7 +31,11 @@ test_expect_success UNZIP 'zip archive' '
3031
3132
git archive --format=zip HEAD >test.zip &&
3233
33-
( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) &&
34+
mkdir unzipped &&
35+
(
36+
cd unzipped &&
37+
"$GIT_UNZIP" ../test.zip
38+
) &&
3439
3540
test_cmp sample unzipped/sample
3641

0 commit comments

Comments
 (0)