From a9b0c1d89e82452c0e799ae7e4674b991e8a011b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 6 Dec 2017 10:57:10 -0200 Subject: Ensure we have the right ssh command --- git-checkout-branch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-checkout-branch') diff --git a/git-checkout-branch b/git-checkout-branch index 249ce93..a237a23 100755 --- a/git-checkout-branch +++ b/git-checkout-branch @@ -26,8 +26,11 @@ BASENAME="`basename $0`" # 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 -- cgit v1.2.3