summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-09 23:31:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-09 23:31:44 -0400
commit0d5c4022105a393a4eac76b09940f8b22fa0a56c (patch)
treea86e5d64d4b9fc95b0316c5fb08b9eef925bd1b7 /Annex.hs
parent9ffd97442b3f2e4e9de6895d843aee382ad10dfd (diff)
Add annex-trustlevel configuration settings, which can be used to override the trust level of a remote.
This overrides the trust.log, and is overridden by the command-line trust parameters. It would have been nicer to have Logs.Trust.trustMap just look up the configuration for all remotes, but a dependency loop prevented that (Remotes depends on Logs.Trust in several ways). So instead, look up the configuration when building remotes, storing it in the same forcetrust field used for the command-line trust parameters.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Annex.hs b/Annex.hs
index f1e46126a..b365132e5 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -40,7 +40,6 @@ import qualified Types.Remote
import Types.Crypto
import Types.BranchState
import Types.TrustLevel
-import Types.UUID
import qualified Utility.Matcher
import qualified Data.Map as M
@@ -84,7 +83,7 @@ data AnnexState = AnnexState
, forcebackend :: Maybe String
, forcenumcopies :: Maybe Int
, limit :: Matcher (FilePath -> Annex Bool)
- , forcetrust :: [(UUID, TrustLevel)]
+ , forcetrust :: TrustMap
, trustmap :: Maybe TrustMap
, ciphers :: M.Map EncryptedCipher Cipher
, flags :: M.Map String Bool
@@ -106,7 +105,7 @@ newState gitrepo = AnnexState
, forcebackend = Nothing
, forcenumcopies = Nothing
, limit = Left []
- , forcetrust = []
+ , forcetrust = M.empty
, trustmap = Nothing
, ciphers = M.empty
, flags = M.empty