From daf90893e029fdb44f970c0b4c20f9e6316a4d97 Mon Sep 17 00:00:00 2001 From: Jean Guyader Date: Mon, 9 Nov 2009 16:58:09 +0000 Subject: [PATCH] [scripts] git_checkout: call git branch in the right directory. --- scripts/git_checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git_checkout.sh b/scripts/git_checkout.sh index 9da8a62..025dd03 100755 --- a/scripts/git_checkout.sh +++ b/scripts/git_checkout.sh @@ -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 -- 2.39.5