aboutsummaryrefslogtreecommitdiff
path: root/Logs/Trust.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-07 14:46:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-07 15:59:16 -0400
commit63a292324d20832b68c92f784828e55e644481cc (patch)
treef49c7077caf738cd285681421f9c9baa03068c99 /Logs/Trust.hs
parentb08f7c428b4bc9eabd95596d08594ddd1057a0bf (diff)
add a UUID type
Should have done this a long time ago.
Diffstat (limited to 'Logs/Trust.hs')
-rw-r--r--Logs/Trust.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Logs/Trust.hs b/Logs/Trust.hs
index 372d8b360..53a1bca2c 100644
--- a/Logs/Trust.hs
+++ b/Logs/Trust.hs
@@ -53,13 +53,12 @@ parseTrust s
{- Changes the trust level for a uuid in the trustLog. -}
trustSet :: UUID -> TrustLevel -> Annex ()
-trustSet uuid level = do
- when (null uuid) $
- error "unknown UUID; cannot modify trust level"
+trustSet uuid@(UUID _) level = do
ts <- liftIO $ getPOSIXTime
Annex.Branch.change trustLog $
showLog show . changeLog ts uuid level . parseLog parseTrust
Annex.changeState $ \s -> s { Annex.trustmap = Nothing }
+trustSet NoUUID _ = error "unknown UUID; cannot modify trust level"
{- Partitions a list of UUIDs to those matching a TrustLevel and not. -}
trustPartition :: TrustLevel -> [UUID] -> Annex ([UUID], [UUID])