From 47250a153a6c5a2864fec15fb136290683aeb1c6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Jan 2012 15:34:52 -0400 Subject: ssh connection caching Ssh connection caching is now enabled automatically by git-annex. Only one ssh connection is made to each host per git-annex run, which can speed some things up a lot, as well as avoiding repeated password prompts. Concurrent git-annex processes also share ssh connections. Cached ssh connections are shut down when git-annex exits. Note: The rsync special remote does not yet participate in the ssh connection caching. --- Locations.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Locations.hs') diff --git a/Locations.hs b/Locations.hs index 73a2473b5..03d6deb1d 100644 --- a/Locations.hs +++ b/Locations.hs @@ -22,6 +22,7 @@ module Locations ( gitAnnexJournalLock, gitAnnexIndex, gitAnnexIndexLock, + gitAnnexSshDir, isLinkToAnnex, annexHashes, hashDirMixed, @@ -142,6 +143,10 @@ gitAnnexIndex r = gitAnnexDir r "index" gitAnnexIndexLock :: Git.Repo -> FilePath gitAnnexIndexLock r = gitAnnexDir r "index.lck" +{- .git/annex/ssh/ is used for ssh connection caching -} +gitAnnexSshDir :: Git.Repo -> FilePath +gitAnnexSshDir r = addTrailingPathSeparator $ gitAnnexDir r "ssh" + {- Checks a symlink target to see if it appears to point to annexed content. -} isLinkToAnnex :: FilePath -> Bool isLinkToAnnex s = ("/.git/" ++ objectDir) `isInfixOf` s -- cgit v1.2.3