diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-15 15:38:52 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-15 15:38:52 +0000 |
commit | cbebf4a738aec13c43a75b3f3c103754fa30cfbc (patch) | |
tree | dcf1ce0a84d530333bdd0d4d9d2d835fe26ade95 /tcwg_kernel-bisect.sh | |
parent | 36f13e70ca2157e439f80c1483b62fed2b8be512 (diff) |
tcwg_kernel-bisect.sh: Fix linux-next workaround
When trying to use linux mainline, the mainline/master branch might
be ahead of linux-next repo, so the tip commit won't be present in
the git clone. Fix this by fetching mainline repo and using
merge-base of mainline and $bad_rev as tentative good commit.
Change-Id: I21eaa98b2ebd156b846b109e8bb41e6528399f2a
Diffstat (limited to 'tcwg_kernel-bisect.sh')
-rwxr-xr-x | tcwg_kernel-bisect.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh index 6d3579b9..5d7b093d 100755 --- a/tcwg_kernel-bisect.sh +++ b/tcwg_kernel-bisect.sh @@ -172,8 +172,14 @@ EOF if [ x"$res" = x"0" ]; then good_rev=$linux_next_stable else - # Check if we can use linux-next/stable as our last resort. - mainline_master="${mainline_master-$(git ls-remote git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git refs/heads/master | cut -f 1)}" + # Check if we can use linux-mainline/master as our last resort. + url=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git remote add mainline "$url" > /dev/null 2>&1 || true + git remote set-url mainline "$url" + clone_or_update_repo . refs/remotes/mainline/master "$url" + + merge_base=$(git merge-base $bad_rev HEAD) + mainline_master="${mainline_master-$merge_base}" cat <<EOF | manifest_out declare -g mainline_master=$mainline_master EOF |