fix lack of error when switching to an unknown branch

This commit is contained in:
Rudolf Polzer 2011-06-05 20:24:28 +02:00
parent 2c86c96dcf
commit 04572d3e2f

2
all
View File

@ -771,10 +771,8 @@ case "$cmd" in
else
b=`repobranch "$d"`
if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
exists=true
verbose git checkout $checkoutflags "$b"
elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
exists=true
verbose git checkout $checkoutflags --track -b "$b" "$remote/$b"
else
$ECHO "WTF? Not even branch $b doesn't exist in $d"