From: Sheetal Shinde Date: Tue, 10 Nov 2009 13:48:59 +0000 (+0000) Subject: [scripts] git_checkout: use $checkout instead of $branch X-Git-Url: http://xenbits.xen.org/gitweb?a=commitdiff_plain;h=1dfedf168d4398aa831546034a407b73f7d3e2b3;p=xenclient%2Fbuild.git [scripts] git_checkout: use $checkout instead of $branch --- diff --git a/scripts/git_checkout.sh b/scripts/git_checkout.sh index 025dd03..58e5e72 100755 --- a/scripts/git_checkout.sh +++ b/scripts/git_checkout.sh @@ -41,9 +41,9 @@ git_checkout() checkout=`git_get_branch_name "$componant"` set +e echo "Try to switch to the branch $checkout." - remote_branch=`(cd "$path" && git branch -a) | grep -E "$branch$"` - [ "$?" -ne 0 ] && remote_branch="$branch" - ( cd "$path" && git checkout -b "$branch" $remote_branch ) + remote_branch=`(cd "$path" && git branch -a) | grep -E "$checkout$"` + [ "$?" -ne 0 ] && remote_branch="$checkout" + ( cd "$path" && git checkout -b "$checkout" $remote_branch ) set -e }