@@ -23,10 +23,6 @@ generate_random_characters () {
23
23
perl -pe " s/./chr((ord($&) % 26) + ord('a'))/sge" > " $TEST_ROOT /$NAME "
24
24
}
25
25
26
- file_size () {
27
- test-tool path-utils file-size " $1 "
28
- }
29
-
30
26
filter_git () {
31
27
rm -f * .log &&
32
28
git " $@ "
@@ -361,9 +357,9 @@ test_expect_success PERL 'required process filter should filter data' '
361
357
cp "$TEST_ROOT/test3 ' \' ' sq' \' ' ,\$x=.o" "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r" &&
362
358
>test4-empty.r &&
363
359
364
- S=$(file_size test.r) &&
365
- S2=$(file_size test2.r) &&
366
- S3=$(file_size "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
360
+ S=$(test_file_size test.r) &&
361
+ S2=$(test_file_size test2.r) &&
362
+ S3=$(test_file_size "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
367
363
M=$(git hash-object test.r) &&
368
364
M2=$(git hash-object test2.r) &&
369
365
M3=$(git hash-object "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
@@ -432,9 +428,9 @@ test_expect_success PERL 'required process filter should filter data for various
432
428
(
433
429
cd repo &&
434
430
435
- S=$(file_size test.r) &&
436
- S2=$(file_size test2.r) &&
437
- S3=$(file_size "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
431
+ S=$(test_file_size test.r) &&
432
+ S2=$(test_file_size test2.r) &&
433
+ S3=$(test_file_size "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
438
434
M=$(git hash-object test.r) &&
439
435
M2=$(git hash-object test2.r) &&
440
436
M3=$(git hash-object "testsubdir/test3 ' \' ' sq' \' ' ,\$x=.r") &&
@@ -549,7 +545,7 @@ test_expect_success PERL 'required process filter takes precedence' '
549
545
550
546
echo "*.r filter=protocol" >.gitattributes &&
551
547
cp "$TEST_ROOT/test.o" test.r &&
552
- S=$(file_size test.r) &&
548
+ S=$(test_file_size test.r) &&
553
549
554
550
# Check that the process filter is invoked here
555
551
filter_git add . &&
@@ -573,7 +569,7 @@ test_expect_success PERL 'required process filter should be used only for "clean
573
569
574
570
echo "*.r filter=protocol" >.gitattributes &&
575
571
cp "$TEST_ROOT/test.o" test.r &&
576
- S=$(file_size test.r) &&
572
+ S=$(test_file_size test.r) &&
577
573
578
574
filter_git add . &&
579
575
cat >expected.log <<-EOF &&
@@ -697,9 +693,9 @@ test_expect_success PERL 'process filter should restart after unexpected write f
697
693
echo "this is going to fail" >smudge-write-fail.o &&
698
694
cp smudge-write-fail.o smudge-write-fail.r &&
699
695
700
- S=$(file_size test.r) &&
701
- S2=$(file_size test2.r) &&
702
- SF=$(file_size smudge-write-fail.r) &&
696
+ S=$(test_file_size test.r) &&
697
+ S2=$(test_file_size test2.r) &&
698
+ SF=$(test_file_size smudge-write-fail.r) &&
703
699
M=$(git hash-object test.r) &&
704
700
M2=$(git hash-object test2.r) &&
705
701
MF=$(git hash-object smudge-write-fail.r) &&
@@ -752,9 +748,9 @@ test_expect_success PERL 'process filter should not be restarted if it signals a
752
748
echo "this will cause an error" >error.o &&
753
749
cp error.o error.r &&
754
750
755
- S=$(file_size test.r) &&
756
- S2=$(file_size test2.r) &&
757
- SE=$(file_size error.r) &&
751
+ S=$(test_file_size test.r) &&
752
+ S2=$(test_file_size test2.r) &&
753
+ SE=$(test_file_size error.r) &&
758
754
M=$(git hash-object test.r) &&
759
755
M2=$(git hash-object test2.r) &&
760
756
ME=$(git hash-object error.r) &&
@@ -797,7 +793,7 @@ test_expect_success PERL 'process filter abort stops processing of all further f
797
793
798
794
M="blob=$(git hash-object abort.r)" &&
799
795
rm -f debug.log &&
800
- SA=$(file_size abort.r) &&
796
+ SA=$(test_file_size abort.r) &&
801
797
802
798
git add . &&
803
799
rm -f *.r &&
@@ -859,7 +855,7 @@ test_expect_success PERL 'delayed checkout in process filter' '
859
855
git commit -m "test commit"
860
856
) &&
861
857
862
- S=$(file_size "$TEST_ROOT/test.o") &&
858
+ S=$(test_file_size "$TEST_ROOT/test.o") &&
863
859
PM="ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) " &&
864
860
M="${PM}blob=$(git -C repo rev-parse --verify master:test.a)" &&
865
861
cat >a.exp <<-EOF &&
0 commit comments