summaryrefslogtreecommitdiff
path: root/t/t5703-upload-pack-ref-in-want.sh
diff options
context:
space:
mode:
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>2020-05-19 00:50:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-19 18:15:23 (GMT)
commit1eb73712360744b552f30a6961c03d05bc44bef2 (patch)
tree52e4e5d222fbc053288740f3faf5847954c9e0a0 /t/t5703-upload-pack-ref-in-want.sh
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec (diff)
downloadgit-1eb73712360744b552f30a6961c03d05bc44bef2.zip
git-1eb73712360744b552f30a6961c03d05bc44bef2.tar.gz
git-1eb73712360744b552f30a6961c03d05bc44bef2.tar.bz2
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 <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5703-upload-pack-ref-in-want.sh')
-rwxr-xr-xt/t5703-upload-pack-ref-in-want.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh
index 7fba306..8e55979 100755
--- a/t/t5703-upload-pack-ref-in-want.sh
+++ b/t/t5703-upload-pack-ref-in-want.sh
@@ -52,15 +52,18 @@ test_expect_success 'setup repository' '
test_expect_success 'config controls ref-in-want advertisement' '
test-tool serve-v2 --advertise-capabilities >out &&
- ! grep -a ref-in-want out &&
+ perl -ne "/ref-in-want/ and print" out >out.filter &&
+ test_must_be_empty out.filter &&
git config uploadpack.allowRefInWant false &&
test-tool serve-v2 --advertise-capabilities >out &&
- ! grep -a ref-in-want out &&
+ perl -ne "/ref-in-want/ and print" out >out.filter &&
+ test_must_be_empty out.filter &&
git config uploadpack.allowRefInWant true &&
test-tool serve-v2 --advertise-capabilities >out &&
- grep -a ref-in-want out
+ perl -ne "/ref-in-want/ and print" out >out.filter &&
+ test_file_not_empty out.filter
'
test_expect_success 'invalid want-ref line' '