Fix bug that prevented annex.sshcaching=false configuration from taking effect when on a crippled filesystem. Thanks, divergentdave.

This commit is contained in:
Joey Hess 2016-04-20 14:43:43 -04:00
parent da4ff16805
commit b56218f0c2
Failed to extract signature
3 changed files with 18 additions and 5 deletions

View file

@ -101,13 +101,14 @@ sshConnectionCachingParams socketfile =
- a different filesystem. -}
sshCacheDir :: Annex (Maybe FilePath)
sshCacheDir
| SysConfig.sshconnectioncaching = ifM crippledFileSystem
( maybe (return Nothing) usetmpdir =<< gettmpdir
, ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig)
( Just <$> fromRepo gitAnnexSshDir
| SysConfig.sshconnectioncaching =
ifM (fromMaybe True . annexSshCaching <$> Annex.getGitConfig)
( ifM crippledFileSystem
( maybe (return Nothing) usetmpdir =<< gettmpdir
, Just <$> fromRepo gitAnnexSshDir
)
, return Nothing
)
)
| otherwise = return Nothing
where
gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR"

2
debian/changelog vendored
View file

@ -8,6 +8,8 @@ git-annex (6.20160419) UNRELEASED; urgency=medium
instead of deleting it.
* calckey: New plumbing command, calculates the key that would be used
to refer to a file.
* Fix bug that prevented annex.sshcaching=false configuration from taking
effect when on a crippled filesystem. Thanks, divergentdave.
-- Joey Hess <id@joeyh.name> Tue, 19 Apr 2016 12:57:15 -0400

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="joey"
subject="""comment 6"""
date="2016-04-20T18:40:57Z"
content="""
Thanks, divergentdave for spotting that and also for writing a fix.
I've finally noticed your comment and put the fix in. It would probably be
good to open a todo if you have a patch in the future, to make sure it
doesn't get forgotten about.
"""]]