clean up cruft left in log by bug

This commit is contained in:
Joey Hess 2013-11-09 14:30:26 -04:00
parent a045af36c4
commit 53ab737723
2 changed files with 9 additions and 5 deletions

View file

@ -63,6 +63,11 @@ parseLogWithUUID :: (UUID -> String -> Maybe a) -> String -> Log a
parseLogWithUUID parser = M.fromListWith best . mapMaybe parse . lines parseLogWithUUID parser = M.fromListWith best . mapMaybe parse . lines
where where
parse line parse line
-- This is a workaround for a bug that caused
-- NoUUID items to be stored in the log.
-- It can be removed at any time; is just here to clean
-- up logs where that happened temporarily.
| " " `isPrefixOf` line = Nothing
| null ws = Nothing | null ws = Nothing
| otherwise = parser u (unwords info) >>= makepair | otherwise = parser u (unwords info) >>= makepair
where where

View file

@ -40,8 +40,7 @@ $ git cat-file blob git-annex:uuid.log
"""]] """]]
> Fixed the bug and made git breakage not crash git-annex. [[done]] > Fixed the bug and made git breakage not crash git-annex. [[done]]
> > --[[Joey]]
> You will probably end up with `git annex info` (used to be `git annex
> status`) showing a strange display for "b". Just running "git annex dead > > Update: Also made it automatically clean up the cruft this put in the
> b" will clean that up. (You'd not want to do this if b is an active git > > log. --[[Joey]]
> remote.) --[[Joey]]