$OpenBSD: patch-t_t4019-diff-wserror_sh,v 1.4 2009/11/17 16:29:42 bernd Exp $
--- t/t4019-diff-wserror.sh.orig	Mon Nov 16 23:14:46 2009
+++ t/t4019-diff-wserror.sh	Tue Nov 17 14:55:54 2009
@@ -23,8 +23,8 @@ blue_grep='7;34m' ;# ESC [ 7 ; 3 4 m
 test_expect_success default '
 
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT error >/dev/null &&
@@ -38,8 +38,8 @@ test_expect_success 'without -trail' '
 
 	git config core.whitespace -trail
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT error >/dev/null &&
@@ -54,8 +54,8 @@ test_expect_success 'without -trail (attribute)' '
 	git config --unset core.whitespace
 	echo "F whitespace=-trail" >.gitattributes
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT error >/dev/null &&
@@ -70,8 +70,8 @@ test_expect_success 'without -space' '
 	rm -f .gitattributes
 	git config core.whitespace -space
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT normal >/dev/null &&
@@ -86,8 +86,8 @@ test_expect_success 'without -space (attribute)' '
 	git config --unset core.whitespace
 	echo "F whitespace=-space" >.gitattributes
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT normal >/dev/null &&
@@ -102,8 +102,8 @@ test_expect_success 'with indent-non-tab only' '
 	rm -f .gitattributes
 	git config core.whitespace indent,-trailing,-space
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight error >/dev/null &&
 	grep HT normal >/dev/null &&
@@ -118,8 +118,8 @@ test_expect_success 'with indent-non-tab only (attribu
 	git config --unset core.whitespace
 	echo "F whitespace=indent,-trailing,-space" >.gitattributes
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight error >/dev/null &&
 	grep HT normal >/dev/null &&
@@ -134,8 +134,8 @@ test_expect_success 'with cr-at-eol' '
 	rm -f .gitattributes
 	git config core.whitespace cr-at-eol
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT error >/dev/null &&
@@ -150,8 +150,8 @@ test_expect_success 'with cr-at-eol (attribute)' '
 	git config --unset core.whitespace
 	echo "F whitespace=trailing,cr-at-eol" >.gitattributes
 	git diff --color >output
-	grep "$blue_grep" output >error
-	grep -v "$blue_grep" output >normal
+	grep -a "$blue_grep" output >error
+	grep -a -v "$blue_grep" output >normal
 
 	grep Eight normal >/dev/null &&
 	grep HT error >/dev/null &&
@@ -195,7 +195,7 @@ test_expect_success 'color new trailing blank lines' '
 	git add x &&
 	{ echo a; echo; echo; echo; echo c; echo; echo; echo; echo; } >x &&
 	git diff --color x >output &&
-	cnt=$(grep "${blue_grep}" output | wc -l) &&
+	cnt=$(grep -a "${blue_grep}" output | wc -l) &&
 	test $cnt = 2
 '
 
