diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-25 19:15:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-25 19:15:29 -0400 |
commit | 12b89a3eb81fdac92ec3ea9633bbd9a7d6a72adb (patch) | |
tree | ea35600752cf95dab1522257ee722d29b39fee27 /Annex | |
parent | c3fbe07d7ad03944d0967ebfa2b8f65cbc2ad5dc (diff) |
configure: Check if ssh connection caching is supported by the installed version of ssh and default annex.sshcaching accordingly.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 3 | ||||
-rw-r--r-- | Annex/Ssh.hs | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index f328051e3..fdd03f320 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -313,7 +313,8 @@ saveState :: Bool -> Annex () saveState oneshot = do Annex.Queue.flush False unless oneshot $ do - alwayscommit <- Git.configTrue <$> fromRepo (Git.Config.get "annex.alwayscommit" "true") + alwayscommit <- fromMaybe True . Git.configTrue + <$> fromRepo (Git.Config.get "annex.alwayscommit" "") if alwayscommit then Annex.Branch.commit "update" else Annex.Branch.stage 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 |