Skip to content

Commit 0dbe659

Browse files
Thomas Rastgitster
authored andcommitted
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: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 80a3f53 commit 0dbe659

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5704-bundle.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ test_expect_success 'ridiculously long subject in boundary' '
5454
git bundle list-heads long-subject-bundle.bdl >heads &&
5555
test -s heads &&
5656
git fetch long-subject-bundle.bdl &&
57-
sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary &&
58-
grep "^-$_x40 " boundary
57+
sed -n "/^-/{p;q;}" long-subject-bundle.bdl >boundary &&
58+
grep "^-[0-9a-f]\\{40\\} " boundary
5959
'
6060

6161
test_done

0 commit comments

Comments
 (0)