Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experience it seems quite convenient not to reset actually. If the script works correctly you are already checked out at the commit which introduced the regression and you can immediately play with the codebase to minimize further or try to find a fix. On the other hand, if something went wrong with bisecting itself, you can try to bisect further manually with
git bisect good/bad
. Probably it would be good to get some feedback from other people using the bisect script to make its usage even more convenient.Maybe we should make
reset
optional under a flag then?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experience I got more problems by not resetting. It is also really simple to checkout the first falling commit because the hash is printed at the end of the bisection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, trying to fix the issue on the failing commit is not always useful because the code might have changed after that commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what about the use case of continuing to bisect manually? And could you give some examples of the problems you had because of not resetting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean to continue the bisect manually after the bisection ends?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One example of manual continuation is deadlock in the bsp, I had problems like that in a mixed Java/Scala sources which requires to use bsp server. In such case resetting the bisect would require re-trying all commits again, which can again deadlock.
In my case I was able to finish bisect by manually killing the bsp server, marking the commits manually as good and bad as well as manually passing the command to bisect
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases you can manually mark commits as good/bad and skip running the evaluation command. I have never used it myself but @WojciechMazur seems to have some experience with that. But maybe that's not a very common issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do that you do not need this script. You can just use
git bisect run
directly with the test script.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this sounds reasonable