Fix cleanup of git-annex:export.log after git-annex forget --drop-dead
This log, unlike all other current top-level logs, is a new format log. I have not checked what throwing it at the old log parser did, but it seems likely it ignored unparsable lines, and so perhaps deleted all lines from the log.
This commit is contained in:
parent
4e0d08b66b
commit
d65a78ff5b
2 changed files with 12 additions and 3 deletions
|
@ -3,6 +3,7 @@ git-annex (7.20190220) UNRELEASED; urgency=medium
|
|||
* Fix storage of metadata values containing newlines.
|
||||
(Reversion introduced in version 7.20190122.)
|
||||
* Sped up git-annex export in repositories with lots of keys.
|
||||
* Fix cleanup of git-annex:export.log after git-annex forget --drop-dead.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Wed, 20 Feb 2019 14:20:59 -0400
|
||||
|
||||
|
|
14
Logs.hs
14
Logs.hs
|
@ -25,13 +25,15 @@ data LogVariety
|
|||
getLogVariety :: FilePath -> Maybe LogVariety
|
||||
getLogVariety f
|
||||
| f `elem` topLevelOldUUIDBasedLogs = Just OldUUIDBasedLog
|
||||
| isRemoteStateLog f || isRemoteContentIdentifierLog f = Just NewUUIDBasedLog
|
||||
| f `elem` topLevelNewUUIDBasedLogs = Just NewUUIDBasedLog
|
||||
| isRemoteStateLog f = Just NewUUIDBasedLog
|
||||
| isRemoteContentIdentifierLog f = Just NewUUIDBasedLog
|
||||
| isChunkLog f = ChunkLog <$> chunkLogFileKey f
|
||||
| isRemoteMetaDataLog f = Just RemoteMetaDataLog
|
||||
| isMetaDataLog f || f `elem` otherLogs = Just OtherLog
|
||||
| otherwise = PresenceLog <$> firstJust (presenceLogs f)
|
||||
|
||||
{- All the (old-format) uuid-based logs stored in the top of the git-annex branch. -}
|
||||
{- All the old-format uuid-based logs stored in the top of the git-annex branch. -}
|
||||
topLevelOldUUIDBasedLogs :: [FilePath]
|
||||
topLevelOldUUIDBasedLogs =
|
||||
[ uuidLog
|
||||
|
@ -44,9 +46,15 @@ topLevelOldUUIDBasedLogs =
|
|||
, activityLog
|
||||
, differenceLog
|
||||
, multicastLog
|
||||
, exportLog
|
||||
]
|
||||
|
||||
{- All the new-format uuid-based logs stored in the top of the git-annex branch. -}
|
||||
topLevelNewUUIDBasedLogs :: [FilePath]
|
||||
topLevelNewUUIDBasedLogs =
|
||||
[ exportLog
|
||||
]
|
||||
|
||||
|
||||
{- All the ways to get a key from a presence log file -}
|
||||
presenceLogs :: FilePath -> [Maybe Key]
|
||||
presenceLogs f =
|
||||
|
|
Loading…
Add table
Reference in a new issue