From: Rudolf Polzer Date: Thu, 17 Jun 2010 07:20:48 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.xonotic.org/xonotic X-Git-Tag: xonotic-v0.1.0preview~422^2 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=7e147c7e326b0d218600e590f6289f18bbe93f19;hp=76666d324695939297e0e86a1711abd386d227cc Merge branch 'master' of ssh://git.xonotic.org/xonotic --- diff --git a/all b/all index 964233c0..b88931b4 100755 --- a/all +++ b/all @@ -250,19 +250,25 @@ case "$cmd" in exists=false for d in $repos; do enter "$d0/$d" verbose - if [ -z "$branch" ]; then - b=`repobranch "$d"` - else - b=$branch - fi - if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then + b=$branch + if [ -n "$b" ] && git rev-parse "refs/heads/$b" >/dev/null 2>&1; then exists=true verbose git checkout "$b" - elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then + elif [ -n "$b" ] && git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then exists=true verbose git checkout --track -b "$b" "$remote/$b" else - verbose git checkout "`repobranch "$d"`" + b=`repobranch "$d"` + if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then + exists=true + verbose git checkout "$b" + elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then + exists=true + verbose git checkout --track -b "$b" "$remote/$b" + else + echo "WTF? Not even branch $b doesn't exist in $d" + exit 1 + fi fi cd "$d00" checkself "$cmd" "$@"