From: Rudolf Polzer Date: Mon, 26 Apr 2010 12:11:23 +0000 (+0200) Subject: Merge branch 'master' of ssh://xonotic@git.xonotic.org/xonotic X-Git-Tag: xonotic-v0.1.0preview~482 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=169208535f74c8cd2c2ca4d855cce6fd304af7b1;hp=474bca19f8ed45309e7c021316ac5cf53bf65f63 Merge branch 'master' of ssh://xonotic@git.xonotic.org/xonotic --- diff --git a/all b/all index bffab80c..6166c77c 100755 --- a/all +++ b/all @@ -243,13 +243,17 @@ case "$cmd" in dv=`visible_repo_name "$d"` enter "$d0/$d" verbose a= - while [ x"$a" != x"y" -a x"$a" != x"n" ]; do - echo "Branch in $dv?" - read -r a - done - if [ x"$a" = x"y" ]; then - verbose git push "$remote" "$srcbranch":"$branch" - verbose git checkout --track -b "$branch" "$remote/$branch" + if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then + echo "Already having this branch in $dv." + else + while [ x"$a" != x"y" -a x"$a" != x"n" ]; do + echo "Branch in $dv?" + read -r a + done + if [ x"$a" = x"y" ]; then + verbose git push "$remote" "$srcbranch":"$branch" + verbose git checkout --track -b "$branch" "$remote/$branch" + fi fi cd "$d0" done