Re: [PATCH] Avoid problem with xpg4 grep in Solaris that broke t9400
- From
- Junio C Hamano <jch@google.com>
- Date
- Apr 19, 2012, 16:55 UTC
- Message-ID
- <xmqqfwbzslt2.fsf@junio.mtv.corp.google.com>
- In-Reply-To
- <1334445524-sup-1455@pinkfloyd.chass.utoronto.ca>
Ben Walton <bwalton@artsci.utoronto.ca> writes:
Show 7 quoted lines
> Excerpts from Ben Walton's message of Mon Apr 09 16:13:29 -0400 2012: > > Bump? > ... >> It's possible that the specific pair of grep statements is required. >> It's looking for tab or space, so maybe we get either character in >> some cases, depending on cvs version?
Bump, anybody, on this point?
Show 16 quoted lines
>> If there is a reason for the original construction, I'll find a more >> creative work around for this problem. >> >> t/t9400-git-cvsserver-server.sh | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh >> index 9199550..df1405f 100755 >> --- a/t/t9400-git-cvsserver-server.sh >> +++ b/t/t9400-git-cvsserver-server.sh >> @@ -500,8 +500,8 @@ test_expect_success 'cvs status (no subdirs in header)' ' >> cd "$WORKDIR" >> test_expect_success 'cvs co -c (shows module database)' ' >> GIT_CONFIG="$git_config" cvs co -c > out && >> - grep "^master[ ]\+master$" < out && >> - ! grep -v "^master[ ]\+master$" < out
Is it really the character class, or is it the GNUism "\+", that breaks this?
In other words, does it work if you patch it like this instead?
t/t9400-git-cvsserver-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 9199550..173bf3d 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -500,8 +500,8 @@ test_expect_success 'cvs status (no subdirs in header)' ' cd "$WORKDIR" test_expect_success 'cvs co -c (shows module database)' ' GIT_CONFIG="$git_config" cvs co -c > out && - grep "^master[ ]\+master$" < out && - ! grep -v "^master[ ]\+master$" < out + grep "^master[ ][ ]*master$" <out && + ! grep -v "^master[ ][ ]*master$" <out ' #------------