From: Randolph Sapp <[email protected]>

Switch the if/else branches to correctly deal with a local branch that
already matches our expected branch name.

Signed-off-by: Randolph Sapp <[email protected]>
---
 oe-layertool-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
index 979390f..db870af 100755
--- a/oe-layertool-setup.sh
+++ b/oe-layertool-setup.sh
@@ -462,9 +462,9 @@ checkout_branch() {
     # else just checkout the existing branch
     if git branch | grep -q "$branch"
     then
-        git checkout "origin/$branch" -b "$branch" --track
-    else
         git checkout "$branch"
+    else
+        git checkout "origin/$branch" -b "$branch" --track
     fi
 
     # Now that we are on the proper branch pull the remote branch changes if
-- 
2.52.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17091): 
https://lists.yoctoproject.org/g/meta-arago/message/17091
Mute This Topic: https://lists.yoctoproject.org/mt/117662937/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to