Skip to content

Commit ea7aa4f

Browse files
committed
Merge branch 'dd/t5703-grep-a-fix'
Update an unconditional use of "grep -a" with a perl script in a test. * dd/t5703-grep-a-fix: t5703: replace "grep -a" usage by perl
2 parents d55a4ae + 1eb7371 commit ea7aa4f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

t/t5703-upload-pack-ref-in-want.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@ test_expect_success 'setup repository' '
4949

5050
test_expect_success 'config controls ref-in-want advertisement' '
5151
test-tool serve-v2 --advertise-capabilities >out &&
52-
! grep -a ref-in-want out &&
52+
perl -ne "/ref-in-want/ and print" out >out.filter &&
53+
test_must_be_empty out.filter &&
5354
5455
git config uploadpack.allowRefInWant false &&
5556
test-tool serve-v2 --advertise-capabilities >out &&
56-
! grep -a ref-in-want out &&
57+
perl -ne "/ref-in-want/ and print" out >out.filter &&
58+
test_must_be_empty out.filter &&
5759
5860
git config uploadpack.allowRefInWant true &&
5961
test-tool serve-v2 --advertise-capabilities >out &&
60-
grep -a ref-in-want out
62+
perl -ne "/ref-in-want/ and print" out >out.filter &&
63+
test_file_not_empty out.filter
6164
'
6265

6366
test_expect_success 'invalid want-ref line' '

0 commit comments

Comments
 (0)