Re: [BUG REPORT] Git does not correctly replay bisect log
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Dec 6, 2018, 23:02 UTC
- Message-ID
- <CAP8UFD2+Kk84J=xwGo2bRGUeOXaRCKbLhZSS769qvDMFN8Pg3g@mail.gmail.com>
- In-Reply-To
- <5ab4e3fb2e22097753bde7702e67d6ce924283a2.camel@gmail.com>
On Thu, Dec 6, 2018 at 6:30 PM Lukáš Krejčí <lskrejci@gmail.com> wrote:
Show 5 quoted lines
> > I am talking about `git bisect replay`. The shell script, as far as I > can see, only updates the references (ref/bisect/*) and never checks if > the revisions marked as 'good' are ancestors of the 'bad' one. > Therefore, $GIT_DIR/BISECT_ANCESTORS_OK file is never created.
Indeed `git bisect replay` first only updates the references (ref/bisect/*) according to all the "git bisect {good,bad}" instructions it finds in the log it is passed. After doing that though, before exiting, it calls `bisect_auto_next` which calls `bisect_next` which calls `git bisect--helper --next-all` which checks the merge bases.
I think it is a bug.
`git bisect replay` is right to only update the references (ref/bisect/*) and not to compute and checkout the best commit to test at each step except at the end, but it should probably just create the $GIT_DIR/BISECT_ANCESTORS_OK file if more than one bisection step has been performed (because the merge bases are checked as part of the first bisection step only).
> The first time the ancestors are checked is in the helper (`git-bisect- > -help --next-all`) that has only limited information from refs/bisect*.
`git-bisect--helper --next-all` knows how to get refs/bisect* information, otherwise it couldn't decide which is the next best commit to test.
Thanks for your help in debugging this, Christian.