From: Phillip Wood Date: Fri, 12 Apr 2024 13:35:16 GMT Subject: Re: [RFC] bisect: Introduce skip-when to automatically skip commits Message-ID: <668a443f-8b44-45a9-ae2d-ef3e429456ef@gmail.com> In-Reply-To: Hi Junio On 08/04/2024 17:49, Junio C Hamano wrote: > phillip.wood123@gmail.com writes: > > Having said that, a post-checkout script and pre-resume script may > have a huge value in helping those whose tests cannot be automated > (in other words, they cannot do "git bisect run") when they need to > tweak the working tree during bisection. We all have seen, during a > bisection session that spans a segment of history that has another > bug that affects our test *but* is orthogonal to the bug we are > chasing, that we "cherry-pick --no-commit" the fix for that other > problem inside "git bisect run" script. It might look something > like > > #!/bin/sh > if git merge-base --is-ancestor $the_other_bug HEAD > then > # we need the fix > git cherry-pick --no-commit $fix_for_the_other_bug || > exit 125 > fi > > make test > status=$? > git reset --hard ;# undo the cherry-pick > exit $status I like this suggestion. A generalized post-checkout script that prepares the wortree and can indicate that this commit should be skipped could be really useful. When having to test manually being able to automate building each checkout would be convenient even if one does not have an orthogonal bug to worry about. Best Wishes Phillip