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

Re: Scriptable mode for git bisect

From
CFClaus Fischer <claus.fischer@clausfischer.com>
Date
Sep 25, 2022, 12:42 UTC
Message-ID
<C9CD178B-7A21-4F89-9D74-7CBD68DBF0C2@clausfischer.com>
In-Reply-To
<Yy+n7/NolP5rCpwX@danh.dev>
Oh thank you, I didn’t know that / didn’t grasp that while reading (apparently too fast) your previous mails.
That is way nicer.
Thank you.
Claus
Show 28 quoted lines
> On 25.09.2022, at 02:59, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
> 
> On 2022-09-25 01:46:13+0200, Claus Fischer <claus.fischer@clausfischer.com> wrote:
>> Well since I usually don’t have many revisions backwards, typically
>> no more than 50, I can just traverse the tree backwards from main.
>> I remember the last ‘bad’ revision before the good one.
>> So there’s a solution for me.
>> 
>> Yes the bisect command puts the correct ‘first bad’ revision in its
>> output but it’s surrounded by a large amount of useless text. It
>> would be nice to have a ‘quiet’ flag that lets it output just the
>> bad revision. Alternatively, that it ends by checking out just that
>> bad revision before revert.
>> 
>> My problem is solved by stepping backwards to HEAD~1 each time, but
>> you might consider making bisect more scriptable.
> 
> No, you don't need to parse "git bisect" output to get the "first bad"
> revision. The "first bad" revision is stored in refs/bisect/bad.
> 
> And you can take the "first bad" revision in a scriptable way with:
> 
> 	FIRST_BAD=$(git rev-parse --verify refs/bisect/bad)
> 
> Of course, after finishing bisecting.
> 
> -- 
> Danh
Previous: Đoàn Trần Công DanhNext: Junio C Hamano
Message 7 of 8 in “Scriptable mode for git bisect”
  1. Claus FischerSep 23, 2022
  2. Đoàn Trần Công DanhSep 24, 2022
  3. Claus FischerSep 24, 2022
  4. Đoàn Trần Công DanhSep 24, 2022
  5. Junio C HamanoSep 24, 2022
  6. Đoàn Trần Công DanhSep 25, 2022
  7. Claus FischerSep 25, 2022
  8. Junio C HamanoSep 26, 2022

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.