summaryrefslogtreecommitdiff
path: root/Annex/Branch
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-14 14:10:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-14 14:15:07 -0400
commit9f5b8638a990f8d163afaf62e15331515fdcb21f (patch)
tree51584af5c9bfe07e12703bf5dabc45bf776b57e3 /Annex/Branch
parent9433c62da3d0c7b45ba528f01e000630f999cb27 (diff)
vicfg: Deleting configurations now resets to the default, where before it has no effect.
Added a Default instance for TrustLevel, and was able to use that to clear up several other parts of the code too. This commit was sponsored by Stephan Schulz
Diffstat (limited to 'Annex/Branch')
-rw-r--r--Annex/Branch/Transitions.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Annex/Branch/Transitions.hs b/Annex/Branch/Transitions.hs
index f5833c0bc..9d306fe80 100644
--- a/Annex/Branch/Transitions.hs
+++ b/Annex/Branch/Transitions.hs
@@ -19,6 +19,7 @@ import Types.TrustLevel
import Types.UUID
import qualified Data.Map as M
+import Data.Default
data FileTransition
= ChangeFile String
@@ -60,4 +61,4 @@ dropDeadFromPresenceLog :: TrustMap -> [Presence.LogLine] -> [Presence.LogLine]
dropDeadFromPresenceLog trustmap = filter $ notDead trustmap (toUUID . Presence.info)
notDead :: TrustMap -> (v -> UUID) -> v -> Bool
-notDead trustmap a v = M.findWithDefault SemiTrusted (a v) trustmap /= DeadTrusted
+notDead trustmap a v = M.findWithDefault def (a v) trustmap /= DeadTrusted