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

Re: Git bisect does not find commit introducing the bug

From
Jakub Narębski <jnareb@gmail.com>
Date
Feb 20, 2017, 12:27 UTC
Message-ID
<58d25138-de2e-6995-444f-79c3ac0bbad2@gmail.com>
In-Reply-To
<CABEd3j8sgDd8DXW8+2Q7pjANPTr-Ws1Xs1ap875mkxFOfnenYw@mail.gmail.com>
W dniu 20.02.2017 o 08:38, Oleg Taranenko pisze:
Show 24 quoted lines
>>>> Then you must adjust your definition of "good": All commits that do not have
>>>> the feature, yet, are "good": since they do not have the feature in the
>>>> first place, they cannot have the breakage that you found in the feature.
>>>>
>>>> That is exactly the situation in your original example! But you constructed
>>>> the condition of goodness in such a simplistic way (depending on the
>>>> presence of a string), that it was impossible to distinguish between "does
>>>> not have the feature at all" and "has the feature, but it is broken".
>>>
>>> Johannes, thank you for correctly identifying the error in my logic.
>>> Indeed I was using the term 'bad' also for the commit without the
>>> feature. In order to find the commit introducing the bug in my example
>>> a new state is needed, which would make 'git bisect' a bit more
>>> complicated than the user 'most of the time' probably needs. Or do you
>>> think, it would make sense to ask the user for this state (if e.g 'git
>>> bisect' would be started with a new parameter)?
> 
>> If a commit doesn't have the feature, then it is by definition, not
>> containing a broken feature, and you can simply use the "good" state.
>> There is no need for a different state. If you can't test the commit
>> because it's broken in some other way, you can use "git bisect skip"
>> but that isn't what you want in this case.
> 
> Commits missing feature == 'good' commit is a very confusing one.
Nowadays you can change the names for 'old' and 'new' with
`git bisect terms`.  HTH.
 
Show 9 quoted lines
> Looks like in real life it happens much often, then git developers can
> imagine. For multi-branch/multi-feature workflow it's pretty easy not
> to recognize whether it is missing or not developed yet, especially on
> retrospective view where cherry-picking/squashing/merging is being
> used. My experience shows most annoying bugs are generating after a
> heavy merge (evil merge) with conflicts resolutions, where developer
> is not involved in the knowing what happens on counterpart changes.
> Then feature can be disappeared after it was worked & tested in its
> own branches.
Good to know about this problem.
> @Alex, I'm pretty interesting in fixing this weird bisect behaviour as
> well, as far as I struggled on it last summer and continue struggling
> so far :) If you want we can join to your efforts on fixing.

Anyway, I don't think it is feasible to weaken the assumption that there is only one transition from 'old' ('good') to 'new' ('bad'); this is what allows O(log(N)) operations. See bisection method of root finding, that is finding zeros of a continuous function.

Best,
-- 
Jakub Narębski
Previous: Oleg TaranenkoNext: Oleg Taranenko
Message 15 of 26 in “Git bisect does not find commit introducing the bug”
  1. Alex HoffmanFeb 17, 2017
  2. Stephan BeyerFeb 17, 2017
  3. Johannes SixtFeb 18, 2017
  4. Alex HoffmanFeb 18, 2017
  5. Johannes SixtFeb 18, 2017
  6. Alex HoffmanFeb 18, 2017
  7. Christian CouderFeb 18, 2017
  8. Alex HoffmanFeb 19, 2017
  9. Alex HoffmanFeb 19, 2017
  10. Christian CouderFeb 19, 2017
  11. Johannes SixtFeb 19, 2017
  12. Alex HoffmanFeb 19, 2017
  13. Jacob KellerFeb 19, 2017
  14. Oleg TaranenkoFeb 20, 2017
  15. Jakub NarębskiFeb 20, 2017
  16. Oleg TaranenkoFeb 20, 2017
  17. Alex HoffmanFeb 20, 2017
  18. Jakub NarębskiFeb 20, 2017
  19. Alex HoffmanFeb 20, 2017
  20. Philip OakleyFeb 20, 2017
  21. Alex HoffmanFeb 21, 2017
  22. Philip OakleyFeb 21, 2017
  23. Junio C HamanoFeb 20, 2017
  24. Philip OakleyFeb 18, 2017
  25. Hilco WijbengaFeb 18, 2017
  26. Johannes SixtFeb 18, 2017

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.