# Checkout the branch containing a commit
function checkout_branch {
+ # Ensure we have the right ssh command
+ GIT_SSH_COMMAND="`git config core.sshCommand`"
+
# Fetch from all repositories
- git fetch --all
+ GIT_SSH_COMMAND="$GIT_SSH_COMMAND" git fetch --all
# Check if we are in a detached HEAD
if git branch | grep -q '* (HEAD detached'; then
exit 1
fi
+# Ensure we have the right ssh command
+GIT_SSH_COMMAND="`git config core.sshCommand`"
+
# Run
git fetch --all
git pull $* || exit 1
git submodule sync --recursive
-git submodule update --recursive --init
+GIT_SSH_COMMAND="$GIT_SSH_COMMAND" git submodule update --recursive --init
git submodules-checkout-branch