summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-10 15:36:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-11 00:06:54 -0400
commitabdacf58ed5d0da0439819feb669b04b2368bb92 (patch)
tree77694958b647c8015104d1d8151a744a03666070 /Logs
parent16e7178f207b0472346c06f30aa210cebe373c36 (diff)
tweaks
Diffstat (limited to 'Logs')
-rw-r--r--Logs/Trust.hs18
1 files changed, 8 insertions, 10 deletions
diff --git a/Logs/Trust.hs b/Logs/Trust.hs
index 4dd728a8b..1a6716d17 100644
--- a/Logs/Trust.hs
+++ b/Logs/Trust.hs
@@ -1,6 +1,6 @@
-{- git-annex trust
+{- git-annex trust log
-
- - Copyright 2010 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2012 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -76,14 +76,12 @@ trustMap = do
where
configuredtrust r =
maybe Nothing (\l -> Just (Types.Remote.uuid r, l)) <$>
- (convert <$> getTrustLevel (Types.Remote.repo r))
- convert :: Maybe String -> Maybe TrustLevel
- convert Nothing = Nothing
- convert (Just s)
- | s == "trusted" = Just Trusted
- | s == "untrusted" = Just UnTrusted
- | s == "semitrusted" = Just SemiTrusted
- | otherwise = Nothing
+ maybe Nothing convert <$>
+ getTrustLevel (Types.Remote.repo r)
+ convert "trusted" = Just Trusted
+ convert "untrusted" = Just UnTrusted
+ convert "semitrusted" = Just SemiTrusted
+ convert _ = Nothing
{- The trust.log used to only list trusted repos, without a field for the
- trust status, which is why this defaults to Trusted. -}