diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2021-10-13 14:01:03 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2021-10-13 14:01:03 +0000 |
commit | 9ef282ca0942fe32f2853c783b9672bd930a8c1c (patch) | |
tree | b869cf475cfb4807caab1c379151e4c750ed9a86 /git/bin/git-checkout-branches | |
parent | Releasing version 20210928. (diff) | |
download | service-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/bin/git-checkout-branches')
-rwxr-xr-x | git/bin/git-checkout-branches | 7 |
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 |