Future proof activity log parsing
When the log has an activity that is not known, eg added by a future version of git-annex, it used to be treated as no activity at all, which would make git-annex expire think it should expire the repository, despite it having some kind of recent activity. Hopefully there will be no reason to add a new activity until enough time has passed that this commit is in use everywhere. Sponsored-by: Jake Vosloo on Patreon
This commit is contained in:
parent
372ace599a
commit
78da00c7a6
6 changed files with 89 additions and 12 deletions
|
@ -111,6 +111,6 @@ parseExpire ps = do
|
|||
parseActivity :: MonadFail m => String -> m Activity
|
||||
parseActivity s = case readish s of
|
||||
Nothing -> Fail.fail $ "Unknown activity. Choose from: " ++
|
||||
unwords (map show [minBound..maxBound :: Activity])
|
||||
unwords (map show allActivities)
|
||||
Just v -> return v
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue