]> git.wh0rd.org Git - home.git/commitdiff
git rb-all: auto skip branches that don't track remotes
authorMike Frysinger <vapier@gentoo.org>
Sat, 17 Feb 2018 01:36:15 +0000 (20:36 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 17 Feb 2018 01:36:15 +0000 (20:36 -0500)
.bin/git-rb-all

index 839d1432f68b4674fb757985464bfc4132b4a0d4..b4efb482a1887f558fffdf1f5634be4d68a3f06b 100755 (executable)
@@ -4,10 +4,15 @@
 rb_one() {
        local b=$1
 
-       echo "### ${b}"
-       git checkout -q "${b}" || exit
-       if ! git rebase ; then
-               git rebase --abort
+       printf "### ${b}"
+       if ! git config --local "branch.${b}.merge" >/dev/null; then
+               echo " -> skipping due to missing merge branch"
+       else
+               echo
+               git checkout -q "${b}" || exit
+               if ! git rebase ; then
+                       git rebase --abort
+               fi
        fi
 }