Windows: Ssh connection caching is now supported.

Turns out the socket stuff just works on windows.
This commit is contained in:
Joey Hess 2013-06-17 22:05:49 -04:00
parent 724272e6b3
commit 07a17f58b7
2 changed files with 6 additions and 7 deletions

View file

@ -63,18 +63,16 @@ sshInfo (host, port) = go =<< sshCacheDir
, Params "-o ControlMaster=auto -o ControlPersist=yes"
]
{- ssh connection caching creates sockets, so will not work on a
- crippled filesystem. A GIT_ANNEX_TMP_DIR can be provided to use
{- ssh connection caching creates sockets, so will not work on all file
- systems. A GIT_ANNEX_TMP_DIR can be provided to use
- a different filesystem. -}
sshCacheDir :: Annex (Maybe FilePath)
sshCacheDir
| SysConfig.sshconnectioncaching = ifM crippledFileSystem
( maybe (return Nothing) usetmpdir =<< gettmpdir
, ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig)
| SysConfig.sshconnectioncaching =
ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig)
( Just <$> fromRepo gitAnnexSshDir
, return Nothing
, maybe (return Nothing) usetmpdir =<< gettmpdir
)
)
| otherwise = return Nothing
where
gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR"