Skip to content
Snippets Groups Projects
Commit 0dbe6592 authored by Thomas Rast's avatar Thomas Rast Committed by Junio C Hamano
Browse files

t5704: fix nonportable sed/grep usages


OS X's sed and grep would complain with (respectively)

  sed: 1: "/^-/{p;q}": extra characters at the end of q command
  grep: Regular expression too big

For sed, use an explicit ; to terminate the q command.

For grep, spell the "40 hex digits" explicitly in the regex, which
should be safe as other tests already use this and we haven't got
breakage reports on OS X about them.

Signed-off-by: default avatarThomas Rast <trast@inf.ethz.ch>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 80a3f534
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,8 @@ test_expect_success 'ridiculously long subject in boundary' ' ...@@ -54,8 +54,8 @@ test_expect_success 'ridiculously long subject in boundary' '
git bundle list-heads long-subject-bundle.bdl >heads && git bundle list-heads long-subject-bundle.bdl >heads &&
test -s heads && test -s heads &&
git fetch long-subject-bundle.bdl && git fetch long-subject-bundle.bdl &&
sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary && sed -n "/^-/{p;q;}" long-subject-bundle.bdl >boundary &&
grep "^-$_x40 " boundary grep "^-[0-9a-f]\\{40\\} " boundary
' '
test_done test_done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment