summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-11 00:24:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-11 00:24:32 -0400
commit1062d35cf793718617561bb112ffbc61de8a6801 (patch)
treeaf6fd97952e62b9568e0cc94f702991d08ae82fa
parent1b0ba6a39357920e5fe8c2ef4cecac6decbd1542 (diff)
add trustExclude
-rw-r--r--Logs/Trust.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Logs/Trust.hs b/Logs/Trust.hs
index cd437bf89..f61966b9e 100644
--- a/Logs/Trust.hs
+++ b/Logs/Trust.hs
@@ -11,6 +11,7 @@ module Logs.Trust (
trustGet,
trustSet,
trustPartition,
+ trustExclude,
lookupTrust,
trustMapLoad,
trustMapRaw,
@@ -67,6 +68,10 @@ trustPartition level ls
candidates <- trustGet level
return $ partition (`elem` candidates) ls
+{- Filters UUIDs to those not matching a TrustLevel. -}
+trustExclude :: TrustLevel -> [UUID] -> Annex ([UUID])
+trustExclude level ls = snd <$> trustPartition level ls
+
{- trustLog in a map, overridden with any values from forcetrust or
- the git config. The map is cached for speed. -}
trustMap :: Annex TrustMap