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

Re: What's cooking in git.git (Apr 2017, #04; Wed, 19)

From
Christian Couder <christian.couder@gmail.com>
Date
Apr 22, 2017, 17:32 UTC
Message-ID
<CAP8UFD3QJ5irxNZqn__CqXPgi+uY4vhZ2HyrNu9RhScbRU0LOA@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.20.1704221319580.3480@virtualbox>
Hi Dscho,

On Sat, Apr 22, 2017 at 1:48 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 9 quoted lines
>>
>> First bisect should ask you to test merge bases only if there are
>> "good" commits that are not ancestors of the "bad" commit.
>
> Please note that this is a stateless job. The only "state" I have is the
> branch name.
>
> So when something goes wrong, I have *no* indicator what is a known good
> state.
Maybe we could consider the last release a known good state?
Show 24 quoted lines
> The strategy I implemented was to use knowledge about the branches and
> their relations. So when there is a bug in `pu`, the script first tests
> whether the same test passes in `next`. And if it does, that is my
> known-good state.
>
> In the meantime, I cheat and mark all merge-bases as known-good, too. But
> that is by no means a correct assumption: sometimes Junio decides to base
> a patch on top of a really ancient commit, one that may be broken on
> Windows. So there you are, I cannot win, I just tried to implement
> something that works reasonably well, most of the time. It still takes way
> too long.
>
>> Second yeah there is probably an old bug in bisect there. In theory in
>> most cases bisect should ask you to test only one merge base, as:
>>
>> - if the merge base is "bad", it means that the bug has been fixed
>> between the merge base and your "good" commit, and bisecting will
>> stop,
>> - if the merge base is "good", it means that all the merge bases that
>> are ancestor of this merge base are also good, so there is no need to
>> test them
>
> That is not necessarily correct. If there are two merge bases, one may be
> broken, and then that one is the first bad commit.

I wrote "in most cases" above because I think that it is not usual for git.git to have branches that start from a commit that is not among the set given by `git rev-list --first-parent master`.

So "in most cases" all the merge bases are among the first parents of master, which means that if bisect was smart enough to first test the last of these merge bases and to discard the merge bases that are among its ancestors, then bisect would not need to test the other merge bases.

Even if there were a few merge bases that were not among the first parents of master, the number of merge bases to test could be reduced a lot.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 16 of 29 in “What's cooking in git.git (Apr 2017, #04; Wed, 19)”
  1. Junio C HamanoApr 20, 2017
  2. Duy NguyenApr 20, 2017
  3. Jeff KingApr 20, 2017
  4. Junio C HamanoApr 20, 2017
  5. Junio C HamanoApr 20, 2017
  6. Lars SchneiderApr 20, 2017
  7. Junio C HamanoApr 20, 2017
  8. Johannes SchindelinApr 20, 2017
  9. Brandon WilliamsApr 20, 2017
  10. Brandon WilliamsApr 20, 2017
  11. Junio C HamanoApr 21, 2017
  12. Junio C HamanoApr 20, 2017
  13. Johannes SchindelinApr 21, 2017
  14. Christian CouderApr 21, 2017
  15. Johannes SchindelinApr 22, 2017
  16. Christian CouderApr 22, 2017
  17. Johannes SchindelinApr 24, 2017
  18. Johannes SixtApr 22, 2017
  19. Johannes SchindelinApr 24, 2017
  20. Philip OakleyApr 24, 2017
  21. Christian CouderApr 25, 2017
  22. Christian CouderApr 25, 2017
  23. Johannes SixtApr 25, 2017
  24. Junio C HamanoApr 25, 2017
  25. Johannes SixtApr 25, 2017
  26. Junio C HamanoApr 24, 2017
  27. Johannes SchindelinApr 24, 2017
  28. Ævar Arnfjörð BjarmasonApr 24, 2017
  29. Junio C HamanoApr 25, 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.