summaryrefslogtreecommitdiffstats
path: root/git
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2021-10-13 14:01:03 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2021-10-13 14:01:03 +0000
commit9ef282ca0942fe32f2853c783b9672bd930a8c1c (patch)
treeb869cf475cfb4807caab1c379151e4c750ed9a86 /git
parentReleasing version 20210928. (diff)
downloadservice-tools-9ef282ca0942fe32f2853c783b9672bd930a8c1c.tar.xz
service-tools-9ef282ca0942fe32f2853c783b9672bd930a8c1c.zip
Correcting current and default branch handling in git-checkout-branches.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'git')
-rwxr-xr-xgit/bin/git-checkout-branches7
1 files changed, 1 insertions, 6 deletions
diff --git a/git/bin/git-checkout-branches b/git/bin/git-checkout-branches
index f1aa862..e98345d 100755
--- a/git/bin/git-checkout-branches
+++ b/git/bin/git-checkout-branches
@@ -29,16 +29,11 @@ do
BRANCH="$(echo "${REMOTE_BRANCH}" | cut -d/ -f 2-)"
case "${BRANCH}" in
- HEAD)
+ HEAD|${CURRENT_BRANCH})
continue
;;
esac
- if git branch | grep -Eq "^ *${BRANCH}$"
- then
- continue
- fi
-
git checkout -b "${BRANCH}" "${REMOTE_BRANCH}"
done