X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=.bin%2Fgit-rb-all;h=be05ba65bb3de70c3c1565e7b10837570a12736f;hb=64b0a6dd26e21c1c3eac846738470edbe0350251;hp=122d85d2bffc2190445a9b0d21857632e99f1a46;hpb=c7a7c928eef699aca3b652b3002771d3f14a25e1;p=home.git diff --git a/.bin/git-rb-all b/.bin/git-rb-all index 122d85d..be05ba6 100755 --- a/.bin/git-rb-all +++ b/.bin/git-rb-all @@ -41,7 +41,8 @@ main() { cd "$(git rev-parse --show-toplevel)" || return # Skip if rebase is in progress. - if [[ -e .git/rebase-merge/interactive ]] ; then + if [[ -e $(git rev-parse --git-path rebase-merge) || \ + -e $(git rev-parse --git-path rebase-apply) ]] ; then printf "${BAD}skipping due to active rebase${NORMAL}\n" exit 1 fi @@ -51,7 +52,10 @@ main() { branches=( $(git for-each-ref --format='%(refname:short)' 'refs/heads/*') ) for b in "${branches[@]}" ; do - rb_one "${b}" "${opts[@]}" + # If it's a branch in another worktree, ignore it. + if [[ $(git branch --list "${b}") != "+"* ]] ; then + rb_one "${b}" "${opts[@]}" + fi done git checkout -q "${orig}"