Fix bug that prevented enumerating locally present objects in repos tuned with annex.tune.objecthash1=true
Need to walk 1 level of subdirs less in this case. The git-annex branch traversal code didn't have a similar bug.
This commit is contained in:
parent
c558b39686
commit
0a998032ed
3 changed files with 14 additions and 2 deletions
|
@ -13,6 +13,7 @@ module Locations (
|
|||
annexDir,
|
||||
objectDir,
|
||||
gitAnnexLocation,
|
||||
gitAnnexLocationDepth,
|
||||
gitAnnexLink,
|
||||
gitAnnexContentLock,
|
||||
gitAnnexMapping,
|
||||
|
@ -115,6 +116,13 @@ annexLocations config key = map (annexLocation config key) dirHashes
|
|||
annexLocation :: GitConfig -> Key -> (HashLevels -> Hasher) -> FilePath
|
||||
annexLocation config key hasher = objectDir </> keyPath key (hasher $ objectHashLevels config)
|
||||
|
||||
{- Number of subdirectories from the gitAnnexObjectDir
|
||||
- to the gitAnnexLocation. -}
|
||||
gitAnnexLocationDepth :: GitConfig -> Int
|
||||
gitAnnexLocationDepth config = hashlevels + 1
|
||||
where
|
||||
HashLevels hashlevels = objectHashLevels config
|
||||
|
||||
{- Annexed object's location in a repository.
|
||||
-
|
||||
- When there are multiple possible locations, returns the one where the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue