fix invalidating the preferred content cache when changing a group

The ConfigMonitor already did this, but groups can also be changed by eg,
the webapp UI, so need to do it at this deeper level.
This commit is contained in:
Joey Hess 2013-04-08 16:40:34 -04:00
parent 1f1cddbaa7
commit c9e4c218a6

View file

@ -44,7 +44,12 @@ groupChange uuid@(UUID _) modifier = do
showLog (unwords . S.toList) .
changeLog ts uuid (modifier curr) .
parseLog (Just . S.fromList . words)
Annex.changeState $ \s -> s { Annex.groupmap = Nothing }
-- The changed group invalidates the preferred content cache.
Annex.changeState $ \s -> s
{ Annex.groupmap = Nothing
, Annex.preferredcontentmap = Nothing
}
groupChange NoUUID _ = error "unknown UUID; cannot modify"
groupSet :: UUID -> S.Set Group -> Annex ()