On 07/25/2018 11:53 AM, Wei Liu wrote:
> On Wed, Jul 25, 2018 at 11:48:36AM +0100, Anthony PERARD wrote:
>> On Tue, Jul 24, 2018 at 01:01:52PM -0500, Doug Goldstein wrote:
>>> On Tue, Jul 24, 2018 at 05:56:51PM +0100, Wei Liu wrote:
>>>> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
>>>> Signed-off-by: Wei Liu <wei.l...@citrix.com>
>>>> ---
>>>> This is a script I wrote previously for build test.
>>>
>>> Goal here is to bisect a series to find the build failure? We could
>>> allow git bisect to do the work and just build and return success or
>>> failure instead of having to walk it by hand. I don't have one
>>> specifically for Xen but on other projects I've got something like:
>>>
>>
>> Actually, it's a script that those a similair job to:
>>     git rebase --exec ./scripts/basic-build.sh <base>
> 
> To expound this a bit:
> 
> That's what I used and told others to use before, but it is far more
> dangerous than this script because git-rebase _rewrites_ history.
> 
> A failed command also doesn't restore original head, so it is less
> convenient -- you have to check the status of the tree every time
> something breaks.

I'm not opposed to the script you have, but it might be worth seeing
what we can do to to use `git rebase`, since that simplifies the processing.

We could have a script, for instance, do something like:

curbranch=$(git name-rev --name-only HEAD)
git checkout -b tmp-series-build-test
if ! git rebase --exec ... $base ; then
        git rebase --abort
fi
git checkout -f $curbranch
git delete -D tmp-series-build-test

The history rewriting is now moot because you're rewriting a temporary
branch.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to