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

Re: [PATCH] bisect: stop printing raw diff of first bad commit

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2015, 21:32 UTC
Message-ID
<xmqqegm0fkwk.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1432829773-4754-1-git-send-email-tbsaunde@tbsaunde.org>
Trevor Saunders <tbsaunde@tbsaunde.org> writes:
Show 5 quoted lines
> Signed-off-by: Trevor Saunders <tbsaunde@tbsaunde.org>
> ---
> The test change only kind of tests the change in behavior and doesn't seem all
> that useful.  However I'm not sure if its preferable to not even try and test
> that something isn't output.

As the only objective of this patch is to stop showing that raw format diff output, I think it is sensible to make sure that the output no longer happens.

I have a feeling that this patch has some backstory? It may be necessary to summarize it in the log message to explain why this is a good thing to do.

Show 12 quoted lines
> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
> index 06b4868..eb820b2 100755
> --- a/t/t6030-bisect-porcelain.sh
> +++ b/t/t6030-bisect-porcelain.sh
> @@ -591,7 +591,8 @@ test_expect_success 'test bisection on bare repo - --no-checkout defaulted' '
>  			"test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>  			>../defaulted.log
>  	) &&
> -	grep "$HASH3 is the first bad commit" defaulted.log
> +	grep "$HASH3 is the first bad commit" defaulted.log &&
> +	test 0 -eq $(grep -c '^:' defaulted.log)
>  '

Your single quotes around the pattern are not doing what you think they are doing.

Why not write this line like this instead?
	! grep "^:" default.log
Thanks.
Previous: Trevor Saunders
Message 2 of 2 in “bisect: stop printing raw diff of first bad commit”
  1. bisect: stop printing raw diff of first bad commitTrevor Saunders, May 28, 2015
  2. Junio C HamanoMay 28, 2015

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.