summaryrefslogtreecommitdiff
path: root/Annex/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-25 19:15:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-25 19:15:29 -0400
commit12b89a3eb81fdac92ec3ea9633bbd9a7d6a72adb (patch)
treeea35600752cf95dab1522257ee722d29b39fee27 /Annex/Ssh.hs
parentc3fbe07d7ad03944d0967ebfa2b8f65cbc2ad5dc (diff)
configure: Check if ssh connection caching is supported by the installed version of ssh and default annex.sshcaching accordingly.
Diffstat (limited to 'Annex/Ssh.hs')
-rw-r--r--Annex/Ssh.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index df9f0e410..47f0ee4f6 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -16,6 +16,7 @@ import Common.Annex
import Annex.LockPool
import qualified Git
import qualified Git.Config
+import qualified Build.SysConfig as SysConfig
{- Generates parameters to ssh to a given host (or user@host) on a given
- port, with connection caching. -}
@@ -37,7 +38,8 @@ sshParams (host, port) opts = go =<< sshInfo (host, port)
sshInfo :: (String, Maybe Integer) -> Annex (Maybe FilePath, [CommandParam])
sshInfo (host, port) = do
- caching <- Git.configTrue <$> fromRepo (Git.Config.get "annex.sshcaching" "true")
+ caching <- fromMaybe SysConfig.sshconnectioncaching . Git.configTrue
+ <$> fromRepo (Git.Config.get "annex.sshcaching" "")
if caching
then do
dir <- fromRepo gitAnnexSshDir