X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=6166c77cf1d9461bce81868b9eebdf94b89f252b;hp=bffab80cc57b73330513d68d8c2af797a9e61e02;hb=169208535f74c8cd2c2ca4d855cce6fd304af7b1;hpb=474bca19f8ed45309e7c021316ac5cf53bf65f63 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