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

Re: Why can't I use git-bisect to find the first *good* commit?

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 28, 2011, 14:40 UTC
Message-ID
<4D909DD1.2050904@viscovery.net>
In-Reply-To
<AANLkTin1QCda9BV+gND1kcXRTZBF7hj3Chce5OkLX2a9@mail.gmail.com>
Am 3/28/2011 16:29, schrieb Andrew Garber:
Show 28 quoted lines
>> I'd expect this to work:
>>
>>    $ git bisect start
>>    $ git bisect good
>>    $ git bisect bad HEAD~100
> 
> So would I. I think the behavior of git bisect should be changed.
> Right now, it's trying to find the first bad commit. Instead, it
> should be trying to find the first commit where the code's good/bad
> state *changed*. IOW, it should be able to handle both of the
> following cases:
> 
> good <--- oldest
> good
> good
> bad <--- the commit we want bisect to find
> bad
> bad <--- newest
> 
> bad <--- oldest
> bad
> bad
> good <--- the commit we want bisect to find
> good
> good <--- newest
> 
> It shouldn't matter which end we start on, so long as one end gets
> marks good, and the other end gets marked bad.
Define "end" and "other end"! It's not that trivial.
      o--o--o--B
     /
  --o--o--o--o--G

When I have this history and I mark B as bad and G as good, will I now find the first bad or the first good commit?

-- Hannes
Previous: Andrew GarberNext: Andrew Garber
Message 8 of 23 in “Why can't I use git-bisect to find the first *good* commit?”
  1. Ævar Arnfjörð BjarmasonMar 28, 2011
  2. Andreas EricssonMar 28, 2011
  3. code.sculptor@gmail.comMar 28, 2011
  4. Matthieu MoyMar 28, 2011
  5. Vincent van RavesteijnMar 28, 2011
  6. Christian CouderMar 28, 2011
  7. Andrew GarberMar 28, 2011
  8. Johannes SixtMar 28, 2011
  9. Andrew GarberMar 28, 2011
  10. Matthieu MoyMar 28, 2011
  11. Andrew GarberMar 28, 2011
  12. Matthieu MoyMar 28, 2011
  13. Andrew GarberMar 28, 2011
  14. Matthieu MoyMar 28, 2011
  15. demerphqMar 28, 2011
  16. Andrew GarberMar 28, 2011
  17. Matthieu MoyMar 28, 2011
  18. Andrew GarberMar 28, 2011
  19. Jeff KingMar 28, 2011
  20. Jeff KingMar 28, 2011
  21. Matthieu MoyMar 28, 2011
  22. Andreas EricssonMar 29, 2011
  23. Michael WittenMay 22, 2011

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.