don't fail if there are temporary branches in local repo

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/ce8bf572
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/ce8bf572
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/ce8bf572

Branch: refs/heads/master
Commit: ce8bf5721c7c6856e2398b7ea6c62c53bcd8bd64
Parents: 06511dd
Author: Alex Heneveld <[email protected]>
Authored: Sat Jan 30 12:07:27 2016 +0000
Committer: Alex Heneveld <[email protected]>
Committed: Sat Jan 30 12:07:27 2016 +0000

----------------------------------------------------------------------
 all.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/ce8bf572/all.sh
----------------------------------------------------------------------
diff --git a/all.sh b/all.sh
index ea73f29..ac0dcbe 100755
--- a/all.sh
+++ b/all.sh
@@ -11,7 +11,7 @@ set -e
 ( cd incubator-brooklyn && git checkout master && git reset --hard 
origin/master )
 # use the "reorg" branch for cleaned history, but first update everything from 
origin
 ( cd incubator-brooklyn && git pull && ( git branch -D reorg || true) && 
-  ( for x in $(git branch | cut -c 3-) ; do git checkout $x ; git reset --hard 
origin/$x ; done ) &&
+  ( for x in $(git branch | cut -c 3-) ; do git checkout $x ; git reset --hard 
origin/$x || echo skipping branch $x not on origin ; done ) &&
   git checkout master && git checkout -b reorg )
 
 

Reply via email to