summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-04-08 16:40:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-04-08 16:43:06 -0400
commit6c1dd46d99e96144cc843ab33441b71d784ae50d (patch)
tree208550ef2e4de2abdda8f56ba8d1c27a41e013c4
parent42e27ceffa8ca585be4a684c43ec187121418b70 (diff)
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.
-rw-r--r--Logs/Group.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Logs/Group.hs b/Logs/Group.hs
index 85906f0a7..ee3b75b86 100644
--- a/Logs/Group.hs
+++ b/Logs/Group.hs
@@ -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 ()