Skip to content

Commit 1eb7371

Browse files
sgngitster
authored andcommitted
t5703: replace "grep -a" usage by perl
On some platforms likes HP-UX, grep(1) doesn't understand "-a". Let's switch to perl. Signed-off-by: Đoàn Trần Công Danh <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af6b65d commit 1eb7371

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
@@ -52,15 +52,18 @@ test_expect_success 'setup repository' '
5252

5353
test_expect_success 'config controls ref-in-want advertisement' '
5454
test-tool serve-v2 --advertise-capabilities >out &&
55-
! grep -a ref-in-want out &&
55+
perl -ne "/ref-in-want/ and print" out >out.filter &&
56+
test_must_be_empty out.filter &&
5657
5758
git config uploadpack.allowRefInWant false &&
5859
test-tool serve-v2 --advertise-capabilities >out &&
59-
! grep -a ref-in-want out &&
60+
perl -ne "/ref-in-want/ and print" out >out.filter &&
61+
test_must_be_empty out.filter &&
6062
6163
git config uploadpack.allowRefInWant true &&
6264
test-tool serve-v2 --advertise-capabilities >out &&
63-
grep -a ref-in-want out
65+
perl -ne "/ref-in-want/ and print" out >out.filter &&
66+
test_file_not_empty out.filter
6467
'
6568

6669
test_expect_success 'invalid want-ref line' '

0 commit comments

Comments
 (0)