]> xenbits.xen.org Git - xenclient/build.git/commitdiff
[scripts] git_checkout: call git branch in the right directory.
authorJean Guyader <jean.guyader@eu.citrix.com>
Mon, 9 Nov 2009 16:58:09 +0000 (16:58 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Mon, 9 Nov 2009 16:58:09 +0000 (16:58 +0000)
scripts/git_checkout.sh

index 9da8a62888706a311408b4ac1da27c1445ce5a3d..025dd034d1258de0a89e39e8a6e750e1583851cb 100755 (executable)
@@ -41,7 +41,7 @@ git_checkout()
         checkout=`git_get_branch_name "$componant"`
         set +e
         echo "Try to switch to the branch $checkout."
-        remote_branch=`git branch -a | grep -E "$branch$"`
+        remote_branch=`(cd "$path" && git branch -a) | grep -E "$branch$"`
         [ "$?" -ne 0 ] && remote_branch="$branch"
         ( cd "$path" && git checkout -b "$branch" $remote_branch )
         set -e