add trustExclude

This commit is contained in:
Joey Hess 2012-11-11 00:24:32 -04:00
parent 3f8ce7a0c5
commit ec337baaee

View file

@ -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