[meta-arago][oe-layersetup][PATCH 4/5] oe-layertool-setup: fix bug with branch checkout
| Newsgroups | org.yoctoproject.lists.meta-arago |
|---|---|
| Message-ID | <[email protected]> |
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