summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-15 14:49:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-15 14:49:40 -0400
commitb6f1f7b167f0e7307744d5b8bbc5a329885d944d (patch)
tree2b57cf4cdef706c973822530e8f71ad4f1f5bb06 /Annex
parent60e0990f8cf066045ffb4a24229add3bede62b03 (diff)
disable ssh connection caching for standalone builds
The standalone build does not bundle its own ssh, so should be built to support as wide an array of ssh versions as possible, so turn off connection caching. Unfortunatly, as implemented this forces a full rebuild when building the standalone binary, and of course it makes it somewhat slower. This is not ideal, but neither is probing the ssh version every time it's run (slow), or once when initializing a repo (fragile).
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Ssh.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index a0aae2b7e..294270e43 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -5,6 +5,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module Annex.Ssh (
sshParams,
sshCleanup,
@@ -52,9 +54,13 @@ sshInfo (host, port) = ifM caching
, return (Nothing, [])
)
where
+#ifdef WITH_OLD_SSH
+ caching = return False
+#else
caching = fromMaybe SysConfig.sshconnectioncaching
. Git.Config.isTrue
<$> getConfig (annexConfig "sshcaching") ""
+#endif
cacheParams :: FilePath -> [CommandParam]
cacheParams socketfile =