From 6398d6b8ac78f5a7cc3cfd06ed0f24c75c0b2d6f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 13 Jul 2013 12:18:52 +0200 Subject: [PATCH] Fix exists= var, fixes #1109 --- misc/tools/all/git.subr | 2 ++ 1 file changed, 2 insertions(+) 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" -- 2.39.2