fix oops
dd31fe7b9e
broke non-bare repos by using
bare hash dirs first, oops
This commit is contained in:
parent
84fad13bbf
commit
0ccbed4f6f
1 changed files with 5 additions and 5 deletions
|
@ -171,7 +171,7 @@ gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> Bool -> (RawFilePat
|
||||||
gitAnnexLocation' key r config crippled symlinkssupported checker gitdir
|
gitAnnexLocation' key r config crippled symlinkssupported checker gitdir
|
||||||
{- Bare repositories default to hashDirLower for new
|
{- Bare repositories default to hashDirLower for new
|
||||||
- content, as it's more portable. But check all locations. -}
|
- content, as it's more portable. But check all locations. -}
|
||||||
| Git.repoIsLocalBare r = checkall
|
| Git.repoIsLocalBare r = checkall id
|
||||||
{- If the repository is configured to only use lower, no need
|
{- If the repository is configured to only use lower, no need
|
||||||
- to check both. -}
|
- to check both. -}
|
||||||
| hasDifference ObjectHashLower (annexDifferences config) =
|
| hasDifference ObjectHashLower (annexDifferences config) =
|
||||||
|
@ -181,16 +181,16 @@ gitAnnexLocation' key r config crippled symlinkssupported checker gitdir
|
||||||
- Then hashDirMixed is used. But, the content could be
|
- Then hashDirMixed is used. But, the content could be
|
||||||
- in either location so check both. -}
|
- in either location so check both. -}
|
||||||
| crippled = if symlinkssupported
|
| crippled = if symlinkssupported
|
||||||
then check $ map inrepo $ reverse $ annexLocations config key
|
then checkall reverse
|
||||||
else checkall
|
else checkall id
|
||||||
{- Regular repositories usually only use hashDirMixed.
|
{- Regular repositories usually only use hashDirMixed.
|
||||||
- However, it's always possible that a bare repository was
|
- However, it's always possible that a bare repository was
|
||||||
- converted to non-bare, or that the cripped filesystem
|
- converted to non-bare, or that the cripped filesystem
|
||||||
- setting changed, so still need to check both. -}
|
- setting changed, so still need to check both. -}
|
||||||
| otherwise = checkall
|
| otherwise = checkall reverse
|
||||||
where
|
where
|
||||||
only = return . inrepo . annexLocation config key
|
only = return . inrepo . annexLocation config key
|
||||||
checkall = check $ map inrepo $ annexLocations config key
|
checkall f = check $ map inrepo $ f $ annexLocations config key
|
||||||
|
|
||||||
inrepo d = gitdir P.</> d
|
inrepo d = gitdir P.</> d
|
||||||
check locs@(l:_) = fromMaybe l <$> firstM checker locs
|
check locs@(l:_) = fromMaybe l <$> firstM checker locs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue