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

Re: [ANNOUNCE] Git 1.7.9.3

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2012, 20:08 UTC
Message-ID
<7v8vjdsdak.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87y5rd4wci.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@inf.ethz.ch> writes:
Show 21 quoted lines
> This can be fixed with the change below, which then gets us into the
> next one
>
>   grep: Regular expression too big
>
> Sheesh, Apple, are you kidding me?!  So we also need to change the grep
> expression.
>
> ----- 8< -----
> Subject: [PATCH] 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, instead
> of being lazy with the shell pattern $_x40.
> ---

Actually the shell pattern $_x40 was invented so that it can be used in both shell, grep and sed; there is nothing *lazy* about it.

I share the "are you kidding me?!" with you. I cannot fathom which part of that regular expression is too big for them to swallow.

In any case, thanks for a quick fix; can I consider it as signed-off?
Show 20 quoted lines
>  t/t5704-bundle.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t5704-bundle.sh b/t/t5704-bundle.sh
> index a51c8b0..9e43731 100755
> --- a/t/t5704-bundle.sh
> +++ b/t/t5704-bundle.sh
> @@ -54,8 +54,8 @@ test_expect_success 'ridiculously long subject in boundary' '
>  	git bundle list-heads long-subject-bundle.bdl >heads &&
>  	test -s heads &&
>  	git fetch long-subject-bundle.bdl &&
> -	sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary &&
> -	grep "^-$_x40 " boundary
> +	sed -n "/^-/{p;q;}" long-subject-bundle.bdl >boundary &&
> +	grep "^-[0-9a-f]\\{40\\} " boundary
>  '
>  
>  test_done
> -- 
> 1.7.6.557.gcee4
Previous: Junio C HamanoNext: Thomas Rast
Message 5 of 6 in “[ANNOUNCE] Git 1.7.9.3”
  1. Junio C HamanoMar 5, 2012
  2. BJ HargraveMar 6, 2012
  3. Thomas RastMar 6, 2012
  4. Junio C HamanoMar 6, 2012
  5. Junio C HamanoMar 6, 2012
  6. Thomas RastMar 6, 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.