From: Rudolf Polzer Date: Sat, 13 Jul 2013 10:18:52 +0000 (+0200) Subject: Fix exists= var, fixes #1109 X-Git-Tag: xonotic-v0.8.0~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6398d6b8ac78f5a7cc3cfd06ed0f24c75c0b2d6f;p=xonotic%2Fxonotic.git Fix exists= var, fixes #1109 --- diff --git a/misc/tools/all/git.subr b/misc/tools/all/git.subr index f7923285..a7f7d354 100644 --- a/misc/tools/all/git.subr +++ b/misc/tools/all/git.subr @@ -698,8 +698,10 @@ case "$cmd" in else b=$branch if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then + [ -n "$b" ] || exists=true verbose git checkout $checkoutflags "$b" elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then + [ -n "$b" ] || exists=true verbose git checkout $checkoutflags --track -b "$b" "$remote/$b" else $ECHO "WTF? Not even branch $b doesn't exist in $d"