git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Avoid problem with xpg4 grep in Solaris that broke t9400

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Apr 19, 2012, 17:39 UTC
Message-ID
<1334857109-sup-7979@pinkfloyd.chass.utoronto.ca>
In-Reply-To
<xmqqfwbzslt2.fsf@junio.mtv.corp.google.com>
Excerpts from Junio C Hamano's message of Thu Apr 19 12:55:53 -0400 2012:
> Is it really the character class, or is it the GNUism "\+", that breaks
> this?

Yes, you're right, it is the \+. I didn't look carefully enough when I saw that test_cmp looked like the way to fix this.

I'll re-word the patch...
> In other words, does it work if you patch it like this instead?
Show 5 quoted lines
> -    grep "^master[     ]\+master$" < out &&
> -    ! grep -v "^master[     ]\+master$" < out
> +    grep "^master[     ][     ]*master$" <out &&
> +    ! grep -v "^master[     ][     ]*master$" <out
>  '

This does work and if there is some significance to the space or tab then it's a better patch.

Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “Avoid problem with xpg4 grep in Solaris that broke t9400”
  1. Avoid problem with xpg4 grep in Solaris that broke t9400Ben Walton, Apr 9, 2012
  2. Ben WaltonApr 14, 2012
  3. Junio C HamanoApr 19, 2012
  4. Ben WaltonApr 19, 2012
  5. Junio C HamanoApr 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.