From 38387e546855a9c6e9fa1d05732b26c8406c0a5b Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Sun, 18 Jul 2021 10:11:13 +0000 Subject: round-robin.sh: Simplify logic for cloning baseline repo ... and don't require component's baseline branch to exist when it's not going to be used. Change-Id: I693fcc3306b1ce95cd684ffe23724b5cf477be01 --- round-robin.sh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/round-robin.sh b/round-robin.sh index d0c4c87e..e61edce5 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -176,23 +176,13 @@ clone_repo () local baseline_branch=${rr[baseline_branch]} - if [ x"${rr[${project}_branch]}" != x"baseline" ]; then - if [ x"${rr[update_baseline]}" = x"init" ]; then - # If rr[update_baseline] is "init", and we aren't going to use - # the baseline branch, checkout always-present "empty" branch. - # Later in push_baseline we will effectively initialize baseline - # branches of components. - baseline_branch=empty - fi - fi - - # Clone baseline remote - clone_baseline_repo $project $baseline_branch $read_only - if [ x"${rr[${project}_branch]}" != x"baseline" ]; then # Fetch and checkout from the non-baseline repo. - clone_or_update_repo $project $branch ${rr[${project}_url]} > /dev/null - fi + clone_or_update_repo $project $branch ${rr[${project}_url]} + else + # Clone baseline remote + clone_baseline_repo $project $baseline_branch $read_only + fi > /dev/null # Allow manifest override if [ x"${rr[${project}_rev]-}" != x"" ]; then -- cgit v1.2.3