dropdead per-remote metadata

Had to refactor pure code into separate modules so it is accessible
inside Annex.Branch.Transitions.

This commit was sponsored by Peter on Patreon.
This commit is contained in:
Joey Hess 2018-09-05 13:20:10 -04:00
parent f1e5dfb7c7
commit 0a7c5a9982
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 197 additions and 109 deletions

View file

@ -16,6 +16,7 @@ data LogVariety
| NewUUIDBasedLog
| ChunkLog Key
| PresenceLog Key
| RemoteMetaDataLog
| OtherLog
deriving (Show)
@ -26,7 +27,8 @@ getLogVariety f
| f `elem` topLevelUUIDBasedLogs = Just UUIDBasedLog
| isRemoteStateLog f = Just NewUUIDBasedLog
| isChunkLog f = ChunkLog <$> chunkLogFileKey f
| isMetaDataLog f || isRemoteMetaDataLog f || f `elem` otherLogs = Just OtherLog
| isRemoteMetaDataLog f = Just RemoteMetaDataLog
| isMetaDataLog f || f `elem` otherLogs = Just OtherLog
| otherwise = PresenceLog <$> firstJust (presenceLogs f)
{- All the uuid-based logs stored in the top of the git-annex branch. -}