public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Jonas Rebmann <kernel@schlaraffenlan.de>, git@vger.kernel.org
Cc: Chris Down <chris@chrisdown.name>, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 1/2] bisect: use selected alternate terms in status output
Date: Tue, 24 Mar 2026 10:43:06 +0000	[thread overview]
Message-ID: <f8f7a220-c40a-480d-b0d0-abfcf5c83157@gmail.com> (raw)
In-Reply-To: <20260323-bisect-terms-v2-1-8d6bdb2c9c7e@schlaraffenlan.de>

Hi Jonas

On 23/03/2026 22:48, Jonas Rebmann wrote:
> 
> diff --git a/builtin/bisect.c b/builtin/bisect.c
> index 4520e585d0..ee6a2c83b8 100644
> --- a/builtin/bisect.c
> +++ b/builtin/bisect.c
> @@ -465,13 +465,16 @@ static void bisect_print_status(const struct bisect_terms *terms)
>   		return;
>   
>   	if (!state.nr_good && !state.nr_bad)
> -		bisect_log_printf(_("status: waiting for both good and bad commits\n"));
> +		bisect_log_printf(_("status: waiting for both %s and %s commits\n"),
> +				  terms->term_good, terms->term_bad);

If we're going to start using alternative terms it might be better to 
enclose them in single quotes to make it clearer that we're referencing 
the term names. Looking at the test below

	"status: waiting for both 'term1' and 'term2' commits"

is clearer to me than

	"status: waiting for both term1 and term2 commits"

>   test_expect_success 'bisect start with one term1 and term2' '
>   	git bisect reset &&
> -	git bisect start --term-old term2 --term-new term1 &&
> -	git bisect term2 $HASH1 &&
> +	git bisect start --term-old term2 --term-new term1 >bisect_result &&
> +	grep "status: waiting for both term2 and term1 commits" bisect_result &&

Using test_grep would make debugging test failures easier as, if it 
fails, it prints a helpful diagnostic message.

Thanks

Phillip

> +	git bisect term2 $HASH1 >bisect_result &&
> +	grep "status: waiting for term1 commit, 1 term2 commit known" bisect_result &&
>   	git bisect term1 $HASH4 &&
>   	git bisect term1 &&
>   	git bisect term1 >bisect_result &&
> @@ -1103,6 +1105,16 @@ test_expect_success 'bisect replay with term1 and term2' '
>   	git bisect reset
>   '
>   
> +test_expect_success 'bisect run term1 term2' '
> +	git bisect reset &&
> +	git bisect start --term-new term1 --term-old term2 $HASH4 $HASH1 &&
> +	git bisect term1 &&
> +	git bisect run false >bisect_result &&
> +	grep "bisect found first term1 commit" bisect_result &&
> +	git bisect log >log_to_replay.txt &&
> +	git bisect reset
> +'
> +
>   test_expect_success 'bisect start term1 term2' '
>   	git bisect reset &&
>   	git bisect start --term-new term1 --term-old term2 $HASH4 $HASH1 &&
> 


  reply	other threads:[~2026-03-24 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 22:48 [PATCH v2 0/2] Avoid hardcoded "good"/"bad" bisect terms Jonas Rebmann
2026-03-23 22:48 ` [PATCH v2 1/2] bisect: use selected alternate terms in status output Jonas Rebmann
2026-03-24 10:43   ` Phillip Wood [this message]
2026-03-24 17:33     ` Junio C Hamano
2026-03-23 22:49 ` [PATCH v2 2/2] rev-parse: use selected alternate terms too look up refs Jonas Rebmann
2026-03-24 10:49   ` Phillip Wood
2026-03-24 12:30     ` Jonas Rebmann
2026-03-24 14:11       ` Phillip Wood
2026-03-24 13:45   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8f7a220-c40a-480d-b0d0-abfcf5c83157@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=chris@chrisdown.name \
    --cc=git@vger.kernel.org \
    --cc=kernel@schlaraffenlan.de \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox