From 2e582df0e0f1589054674c8ed3391f240a37a6df Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Sat, 14 Sep 2013 00:47:12 -0400 Subject: [PATCH] t7508: avoid non-portable sed expression 2556b996 (status: disable display of '#' comment prefix by default; 2013-09-06) introduced tests which fail on Mac OS X due to unportable use of \t (for TAB) in a sed expression. POSIX [1][2] also disallows it. Fix this. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_02 [2]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02 Signed-off-by: Eric Sunshine Acked-by: Matthieu Moy Signed-off-by: Junio C Hamano --- t/t7508-status.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 9bf97017c0..d8c531da76 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -61,7 +61,8 @@ test_expect_success 'status (1)' ' ' strip_comments () { - sed "s/^\# //; s/^\#$//; s/^#\t/\t/" <"$1" >"$1".tmp && + tab=' ' + sed "s/^\# //; s/^\#$//; s/^#$tab/$tab/" <"$1" >"$1".tmp && rm "$1" && mv "$1".tmp "$1" } -- 2.11.4.GIT