Skip to content

Commit 2ed139c

Browse files
Beat Bolligitster
authored andcommitted
t/t1*: avoid redundant uses of cat
Signed-off-by: Beat Bolli <[email protected]> Acked-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74615c2 commit 2ed139c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

t/t1007-hash-object.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ test_expect_success 'check that appropriate filter is invoke when --path is used
124124
path0_sha=$(git hash-object --path=file0 file1) &&
125125
test "$file0_sha" = "$path0_sha" &&
126126
test "$file1_sha" = "$path1_sha" &&
127-
path1_sha=$(cat file0 | git hash-object --path=file1 --stdin) &&
128-
path0_sha=$(cat file1 | git hash-object --path=file0 --stdin) &&
127+
path1_sha=$(git hash-object --path=file1 --stdin <file0) &&
128+
path0_sha=$(git hash-object --path=file0 --stdin <file1) &&
129129
test "$file0_sha" = "$path0_sha" &&
130130
test "$file1_sha" = "$path1_sha"
131131
'
@@ -154,7 +154,7 @@ test_expect_success '--path works in a subdirectory' '
154154
test_expect_success 'check that --no-filters option works' '
155155
nofilters_file1=$(git hash-object --no-filters file1) &&
156156
test "$file0_sha" = "$nofilters_file1" &&
157-
nofilters_file1=$(cat file1 | git hash-object --stdin) &&
157+
nofilters_file1=$(git hash-object --stdin <file1) &&
158158
test "$file0_sha" = "$nofilters_file1"
159159
'
160160

t/t1091-sparse-checkout-builtin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ test_expect_success 'check-rules non-cone mode' '
968968
git -C bare sparse-checkout check-rules --no-cone --rules-file ../rules\
969969
>check-rules-file <all-files &&
970970
971-
cat rules | git -C repo sparse-checkout set --no-cone --stdin &&
971+
git -C repo sparse-checkout set --no-cone --stdin <rules &&
972972
git -C repo ls-files -t >out &&
973973
sed -n "/^S /!s/^. //p" out >ls-files &&
974974

0 commit comments

Comments
 (0)