implement annex.tune.objecthashlower

Split out Annex.DirHashes which never really belonged in Locations.
This commit is contained in:
Joey Hess 2015-01-28 16:51:40 -04:00
parent e8c376e0ad
commit 009bd050c1
6 changed files with 109 additions and 68 deletions

View file

@ -327,13 +327,15 @@ keyUrls r key = map tourl locs'
-- If the remote is known to not be bare, try the hash locations
-- used for non-bare repos first, as an optimisation.
locs
| remoteAnnexBare (gitconfig r) == Just False = reverse (annexLocations key)
| otherwise = annexLocations key
| remoteAnnexBare remoteconfig == Just False = reverse (annexLocations cfg key)
| otherwise = annexLocations cfg key
#ifndef mingw32_HOST_OS
locs' = locs
#else
locs' = map (replace "\\" "/") locs
#endif
remoteconfig = gitconfig r
cfg = fromJust $ remoteGitConfig remoteconfig
dropKey :: Remote -> Key -> Annex Bool
dropKey r key