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

Re: [PATCH] t5541-http-push: make grep expression check for one line only

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2010, 17:47 UTC
Message-ID
<7v7hr63wm7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1264405343-2984-1-git-send-email-rctay89@gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 6 quoted lines
> Simplify the grep expressions in the non-fast-forward tests to check
> only for the first line of the non-fast-forward warning - having that
> line should be enough assurance that the full warning is printed.
>
> In the first place, grep can't deal with expressions for multiple
> lines.

This shows that nobody has ever run this test since January 8th, not even the original author?

Hmmm.
Thanks.
Show 38 quoted lines
>
> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
> ---
>  t/t5541-http-push.sh |   12 ++++--------
>  1 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
> index 83a8e14..53f54a2 100755
> --- a/t/t5541-http-push.sh
> +++ b/t/t5541-http-push.sh
> @@ -105,10 +105,8 @@ test_expect_success 'non-fast-forward push show ref status' '
>  '
>  
>  test_expect_success 'non-fast-forward push shows help message' '
> -	grep \
> -"To prevent you from losing history, non-fast-forward updates were rejected
> -Merge the remote changes before pushing again.  See the '"'non-fast-forward'"'
> -section of '"'git push --help'"' for details." output
> +	grep "To prevent you from losing history, non-fast-forward updates were rejected" \
> +		output
>  '
>  
>  test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
> @@ -126,10 +124,8 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
>  	grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
>  	grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
>  
> -	grep \
> -"To prevent you from losing history, non-fast-forward updates were rejected
> -Merge the remote changes before pushing again.  See the '"'non-fast-forward'"'
> -section of '"'git push --help'"' for details." output
> +	grep "To prevent you from losing history, non-fast-forward updates were rejected" \
> +		output
>  '
>  
>  stop_httpd
> -- 
> 1.6.6
Previous: Tay Ray ChuanNext: Junio C Hamano
Message 2 of 5 in “t5541-http-push: make grep expression check for one line only”
  1. t5541-http-push: make grep expression check for one line onlyTay Ray Chuan, Jan 25, 2010
  2. Junio C HamanoJan 25, 2010
  3. Junio C HamanoJan 25, 2010
  4. Tay Ray ChuanJan 26, 2010
  5. t5541-http-push: make grep expression check for one line onlyTay Ray Chuan, Jan 26, 2010

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.