From 9ef282ca0942fe32f2853c783b9672bd930a8c1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 13 Oct 2021 16:01:03 +0200 Subject: Correcting current and default branch handling in git-checkout-branches. Signed-off-by: Daniel Baumann --- git/bin/git-checkout-branches | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'git/bin/git-checkout-branches') 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 -- cgit v1.2.3