summaryrefslogtreecommitdiff
path: root/update_branches
diff options
context:
space:
mode:
Diffstat (limited to 'update_branches')
-rwxr-xr-xupdate_branches5
1 files changed, 4 insertions, 1 deletions
diff --git a/update_branches b/update_branches
index e3a7399..6728c00 100755
--- a/update_branches
+++ b/update_branches
@@ -1,6 +1,9 @@
#!/bin/sh
-git branch -r | grep -v 'tags/' | sed -e 's/^ *\([^ ]*\)/svn_\1 \1/' \
+remotes_pat=`git remote show | sed -e 's|$|/|' | xargs | tr ' ' '|'`
+
+git branch -r | grep -v 'tags/' | egrep -v "$remotes_pat" \
+ | sed -e 's/^ *\([^ ]*\)/svn_\1 \1/' \
| while read local remote; do
git branch --track -f $local $remote
done