aboutsummaryrefslogtreecommitdiff
path: root/git-checkout-branch
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-12-06 10:57:10 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-12-06 10:57:10 -0200
commita9b0c1d89e82452c0e799ae7e4674b991e8a011b (patch)
tree7107ca85f954260f976580dbb9c46ebadf3b36f2 /git-checkout-branch
parenta1d45ef0832f2b308c6464ee59ceb76916a93a97 (diff)
downloadutils-git-a9b0c1d89e82452c0e799ae7e4674b991e8a011b.tar.gz
utils-git-a9b0c1d89e82452c0e799ae7e4674b991e8a011b.tar.bz2
Ensure we have the right ssh command
Diffstat (limited to 'git-checkout-branch')
-rwxr-xr-xgit-checkout-branch5
1 files changed, 4 insertions, 1 deletions
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