Re: [RFC] bisect: Introduce skip-when to automatically skip commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio

On 08/04/2024 17:49, Junio C Hamano wrote:
phillip.wood123@xxxxxxxxx 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux