]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Ensure we have the right ssh command
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 6 Dec 2017 12:57:10 +0000 (10:57 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 6 Dec 2017 12:57:10 +0000 (10:57 -0200)
git-checkout-branch
git-update-superproject

index 249ce93ec36b37c6bf7e5fb773536552a6aeb473..a237a23d4f7a9c16645ca95f7be76048d8cde0ca 100755 (executable)
@@ -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
index 75ad999ec074b84c603ebf6838c6cb76e867a2d0..a39efe64cbcfbc00bae1170132ef33b9571db4a1 100755 (executable)
@@ -12,9 +12,12 @@ if [ ! -e ".git" ]; 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