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

Re: git bisect should return 1 when the first bad commit is found

From
Jeff King <peff@peff.net>
Date
Jun 23, 2019, 22:49 UTC
Message-ID
<20190623224935.GD1100@sigill.intra.peff.net>
In-Reply-To
<CAC_CU1hHK5n4GcETbWFLBeqT_Y9LV6N32Rv0F0+OCXH2G0qg8Q@mail.gmail.com>
On Sun, Jun 23, 2019 at 01:32:16PM -0700, Pedro Larroy wrote:
Show 9 quoted lines
> Thanks for your answer.
> 
> I was expecting the HEAD to point to the first bad commit.
> 
> In mercurial, the exit status tells you information about the
> bisection process:  https://www.mercurial-scm.org/repo/hg/help/bisect
> 
> Sure one can parse stdout, it's just more tedious than just checking
> the return code and having the HEAD left to the original bad commit.

I think it might be nice for Git to write a well-known refname (like BISECT_RESULT or similar) so that you can refer to that instead of having to read stdout (whether by machine or by a user cutting-and-pasting). And I cannot offhand think of a particular reason why that could not just be HEAD (instead of something bisect-specific) after the bisect finishes.

We do not promise any particular value in HEAD now. The only downside would be the minor cost to checkout the working tree of the known-bad commit if we are not already there.

-Peff
Previous: Pedro LarroyNext: Christian Couder
Message 4 of 9 in “git bisect should return 1 when the first bad commit is found”
  1. Pedro LarroyJun 12, 2019
  2. Junio C HamanoJun 13, 2019
  3. Pedro LarroyJun 23, 2019
  4. Jeff KingJun 23, 2019
  5. Christian CouderJun 24, 2019
  6. Jeff KingJun 25, 2019
  7. Junio C HamanoJun 24, 2019
  8. Jeff KingJun 25, 2019
  9. Junio C HamanoJun 25, 2019

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.