Skip to content

Commit bdfe1f0

Browse files
szedergitster
authored andcommitted
t1600-index: don't run git commands upstream of a pipe
Signed-off-by: SZEDER Gábor <[email protected]> Acked-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c344256 commit bdfe1f0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

t/t1600-index.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ test_expect_success 'bogus GIT_INDEX_VERSION issues warning' '
1313
rm -f .git/index &&
1414
GIT_INDEX_VERSION=2bogus &&
1515
export GIT_INDEX_VERSION &&
16-
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
16+
git add a 2>err &&
17+
sed "s/[0-9]//" err >actual.err &&
1718
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
1819
warning: GIT_INDEX_VERSION set, but the value is invalid.
1920
Using version Z
@@ -27,7 +28,8 @@ test_expect_success 'out of bounds GIT_INDEX_VERSION issues warning' '
2728
rm -f .git/index &&
2829
GIT_INDEX_VERSION=1 &&
2930
export GIT_INDEX_VERSION &&
30-
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
31+
git add a 2>err &&
32+
sed "s/[0-9]//" err >actual.err &&
3133
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
3234
warning: GIT_INDEX_VERSION set, but the value is invalid.
3335
Using version Z
@@ -50,7 +52,8 @@ test_expect_success 'out of bounds index.version issues warning' '
5052
sane_unset GIT_INDEX_VERSION &&
5153
rm -f .git/index &&
5254
git config --add index.version 1 &&
53-
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
55+
git add a 2>err &&
56+
sed "s/[0-9]//" err >actual.err &&
5457
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
5558
warning: index.version set, but the value is invalid.
5659
Using version Z

0 commit comments

Comments
 (0)