summaryrefslogtreecommitdiff
path: root/round-robin-bisect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'round-robin-bisect.sh')
-rwxr-xr-xround-robin-bisect.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index 6a8dc817..2328da64 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -308,8 +308,15 @@ fi
# that might cut down bisection time. Mostly, these are first_bad and
# last_good commits.
interesting_commits="../bisect/interesting-commits"
-interesting_commits_rev=${interesting_commits_rev-linaro-local/ci/${rr[ci_project]}}
-clone_or_update_repo $interesting_commits $interesting_commits_rev https://git-us.linaro.org/toolchain/ci/interesting-commits.git auto $interesting_commits_rev
+
+interesting_commits_url=https://git-us.linaro.org/toolchain/ci/interesting-commits.git
+interesting_commits_branch=linaro-local/ci/${rr[ci_project]}
+if ! git ls-remote --heads $interesting_commits_url \
+ | grep -q ".* refs/heads/$interesting_commits_branch"; then
+ interesting_commits_branch=empty
+fi
+interesting_commits_rev=${interesting_commits_rev-$interesting_commits_branch}
+clone_or_update_repo $interesting_commits $interesting_commits_rev $interesting_commits_url auto $interesting_commits_branch
interesting_commits_rev=$(git -C $interesting_commits rev-parse HEAD)
cat <<EOF | manifest_out
declare -g interesting_commits_rev=$interesting_commits_rev