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

Re: [PATCH v4 0/3] Avoid hardcoded "good"/"bad" bisect terms

From
Junio C Hamano <gitster@pobox.com>
Date
May 14, 2026, 19:56 UTC
Message-ID
<xmqqv7cpepec.fsf@gitster.g>
In-Reply-To
<20260514-bisect-terms-v4-0-b3e3cf1b06ce@schlaraffenlan.de>
Jonas Rebmann <kernel@schlaraffenlan.de> writes:
Show 12 quoted lines
> While checking whether all output messages of git bisect were covered by
> [PATCH 1/3] bisect: use selected alternate terms in status output I
> found hardcoded good/bad refs leading to incompatibility of git
> rev-parse --bisect with alternate bisect run terms. This is addressed by
> [PATCH 3/3] rev-parse: use selected alternate terms to look up refs
>
> Signed-off-by: Jonas Rebmann <kernel@schlaraffenlan.de>
> ---
> Changes in v4:
> - Always print bisect terms in single quote (Thanks, Junio)
> - Split out quoting of bisect terms into separate commit
>> - Link to v3: https://patch.msgid.link/20260417-bisect-terms-v3-0-d659fa547261@schlaraffenlan.de

Having this "Link" is better than nothing, but it alone is not sufficient to help those who mechanise patch consumption with b4.

  https://b4.docs.kernel.org/en/latest/index.html

Please make sure that your cover letter of the (i+1)th iteration [v(i+1) 0/N] is a reply to the cover letter of the i-th iteration [v(i) 0/M]. With that, anybody who has the i-th iteration can

 1. Check out the i-th iteration, e.g., 
    $ git checkout jr/bisect-custom-terms-in-output
 2. Peek at any of the commits on the topic branch with notes/amlog
    e.g.,
    $ git notes --ref=amlog show HEAD
 3. Check out the base, e.g.,
    $ git checkout --detach master...
    Note that the branch that holds the i-th iteration can now be
    accessed via @{-1} (i.e., the branch previously checked out).
 4. Tell B4 to fetch the latest round of the same series, by giving
    one/any of the message-ID we learned earlier, and apply them.
    $ b4 am -o- \
      "<20260417-bisect-terms-v3-2-d659fa547261@schlaraffenlan.de>" |
      git am -s
 5. See what changed with range-diff
    $ git range-diff @{-1}...
 6. When satisified, replace the topic with the new iteration.
    $ git checkout -B @{-1}

It is crucial that b4 can find the newer iteration when given a message-ID from the older iteration in step 4 for this workflow to work, and for that, [v4 0/3] must be a reply to [v3 0/2]. Otherwise b4 will say that v3 is still the last iteration and we cannot make progress.

Show 9 quoted lines
> Changes in v3:
> - when referencing newly introduced terms, reference them in single
>   quotes (Thanks, Phillip)
> - Prefer test_grep over grep in updated Tests (Thanks, Phillip)
> - Improve commit messages (Thanks, Phillip)
> - Don't leak memory after read_bisect_terms() (Thanks, Phillip)
> - Don't leak memory after xstrfmt() (Thanks, Junio)
> - Add test case to patch 2/2
> - Link to v2: https://patch.msgid.link/20260323-bisect-terms-v2-0-8d6bdb2c9c7e@schlaraffenlan.de

With these improvements, v3 was already in a quite good shape, but the latest makes it look even better. Will replace. Thanks.

Previous: Jonas RebmannNext: Jonas Rebmann
Message 5 of 6 in “Avoid hardcoded "good"/"bad" bisect terms”
  1. 0/3 Avoid hardcoded "good"/"bad" bisect termsJonas Rebmann, May 14, 2026
  2. 1/3 bisect: use selected alternate terms in status outputJonas Rebmann, May 14, 2026
  3. 2/3 bisect: print bisect terms in single quotesJonas Rebmann, May 14, 2026
  4. 3/3 rev-parse: use selected alternate terms to look up refsJonas Rebmann, May 14, 2026
  5. Junio C HamanoMay 14, 2026
  6. Jonas RebmannMay 15, 2026

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.