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

Re: [PATCH] t7508: avoid non POSIX BRE

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2021, 02:37 UTC
Message-ID
<xmqqv94oy3le.fsf@gitster.g>
In-Reply-To
<20210801215300.53781-1-carenas@gmail.com>
Carlo Marcelo Arenas Belón  <carenas@gmail.com> writes:
Show 5 quoted lines
> 24c30e0b6 (wt-status: tolerate dangling marks, 2020-09-01) adds a test
> that uses a BRE which breaks at least with OpenBSD's grep.
>
> switch to an ERE as it is done for similar checks and while at it, remove
> the now obsolete test_i18ngrep call.
Thanks, obviously correct.

I wonder if we can more automate detection of such a bug---it is unfortunate that it has become very hard to avoid GNUisms as everybody, even Windows folks, is more likely to be with GNU tools than BSD tools X-<.

Show 19 quoted lines
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  t/t7508-status.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t7508-status.sh b/t/t7508-status.sh
> index 2b72451ba3..05c6c02435 100755
> --- a/t/t7508-status.sh
> +++ b/t/t7508-status.sh
> @@ -882,7 +882,7 @@ test_expect_success 'status shows detached HEAD properly after checking out non-
>  	git clone upstream downstream &&
>  	git -C downstream checkout @{u} &&
>  	git -C downstream status >actual &&
> -	test_i18ngrep "HEAD detached at [0-9a-f]\\+" actual
> +	grep -E "HEAD detached at [0-9a-f]+" actual
>  '
>  
>  test_expect_success 'setup status submodule summary' '
Previous: Carlo Marcelo Arenas Belón
Message 2 of 2 in “t7508: avoid non POSIX BRE”
  1. t7508: avoid non POSIX BRECarlo Marcelo Arenas Belón, Aug 1, 2021
  2. Junio C HamanoAug 2, 2021

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.