optimise ObjectHashLower handling
A repo tuned with ObjectHashLower only ever uses lower-case hash directories, so unlike a bare repo which could have old mixed case directories, there is no need to do an expensive check of the filesystem in this case.
This commit is contained in:
parent
256b86b948
commit
a928190985
1 changed files with 4 additions and 6 deletions
|
@ -144,13 +144,11 @@ gitAnnexLocation' key r config crippled checker gitdir
|
||||||
- Repositories on filesystems that are crippled also use
|
- Repositories on filesystems that are crippled also use
|
||||||
- hashDirLower, since they do not use symlinks and it's
|
- hashDirLower, since they do not use symlinks and it's
|
||||||
- more portable.
|
- more portable.
|
||||||
-
|
|
||||||
- ObjectHashLower can also be set to force it.
|
|
||||||
-}
|
-}
|
||||||
| Git.repoIsLocalBare r
|
| Git.repoIsLocalBare r || crippled =
|
||||||
|| crippled
|
|
||||||
|| hasDifference ObjectHashLower (annexDifferences config) =
|
|
||||||
check $ map inrepo $ annexLocations config key
|
check $ map inrepo $ annexLocations config key
|
||||||
|
| hasDifference ObjectHashLower (annexDifferences config) =
|
||||||
|
return $ inrepo $ annexLocation config key hashDirLower
|
||||||
{- Non-bare repositories only use hashDirMixed, so
|
{- Non-bare repositories only use hashDirMixed, so
|
||||||
- don't need to do any work to check if the file is
|
- don't need to do any work to check if the file is
|
||||||
- present. -}
|
- present. -}
|
||||||
|
|
Loading…
Reference in a new issue