]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Fix exists= var, fixes #1109
authorRudolf Polzer <divverent@xonotic.org>
Sat, 13 Jul 2013 10:18:52 +0000 (12:18 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 13 Jul 2013 10:18:52 +0000 (12:18 +0200)
misc/tools/all/git.subr

index f7923285903bc3673364216280ae82b950325d0c..a7f7d354dba78b047733f72b38653911fc14cbe6 100644 (file)
@@ -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"