]> xenbits.xen.org Git - xenclient/build.git/commitdiff
[scripts] git_checkout: use $checkout instead of $branch
authorSheetal Shinde <sheetal.shinde@citrix.com>
Tue, 10 Nov 2009 13:48:59 +0000 (13:48 +0000)
committerSheetal Shinde <sheetal.shinde@citrix.com>
Tue, 10 Nov 2009 13:54:28 +0000 (13:54 +0000)
scripts/git_checkout.sh

index 025dd034d1258de0a89e39e8a6e750e1583851cb..58e5e72c898ee12ef27f681046f0f2ce96d2583b 100755 (executable)
@@ -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
 }