X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=bdb93f26f2bc7025cc16a02acbc47cf49979e561;hp=93578fc8bb32a1d1effe41d7b89c746da7100752;hb=94fd858c89410402003a550d997306009482fd72;hpb=faea52905aef1516ae6899ddf8e0eae63c0b5984 diff --git a/all b/all index 93578fc8..bdb93f26 100755 --- a/all +++ b/all @@ -252,12 +252,17 @@ case "$cmd" in exists=false for d in $repos; do enter "$d0/$d" verbose - if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then + if [ -z "$branch" ]; then + b=`repobranch "$d"` + else + b=$branch + fi + if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then exists=true - verbose git checkout "$branch" - elif git rev-parse "refs/remotes/$remote/$branch" >/dev/null 2>&1; then + verbose git checkout "$b" + elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then exists=true - verbose git checkout --track -b "$branch" "$remote/$branch" + verbose git checkout --track -b "$b" "$remote/$b" else verbose git checkout "`repobranch "$d"`" fi