diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-01 13:52:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-01 13:58:14 -0400 |
commit | 18a3a186e9cdb69ee503d961d8285a341d818c48 (patch) | |
tree | d415a97f6c65e2268c948c6c2425d1b94b16df92 /Logs | |
parent | b6e3e7516dfdc054b9e1a281b2e49b392d235ee2 (diff) |
type based git config handling for remotes
Still a couple of places that use git config ad-hoc, but this is most of it
done.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Trust.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Logs/Trust.hs b/Logs/Trust.hs index 8f568eba7..058250740 100644 --- a/Logs/Trust.hs +++ b/Logs/Trust.hs @@ -28,7 +28,6 @@ import qualified Annex.Branch import qualified Annex import Logs.UUIDBased import Remote.List -import Config import qualified Types.Remote {- Filename of trust.log. -} @@ -85,14 +84,14 @@ trustMapLoad = do overrides <- Annex.getState Annex.forcetrust logged <- trustMapRaw configured <- M.fromList . catMaybes - <$> (mapM configuredtrust =<< remoteList) + <$> (map configuredtrust <$> remoteList) let m = M.union overrides $ M.union configured logged Annex.changeState $ \s -> s { Annex.trustmap = Just m } return m where - configuredtrust r = maybe Nothing (\l -> Just (Types.Remote.uuid r, l)) - <$> maybe Nothing readTrustLevel - <$> getTrustLevel (Types.Remote.repo r) + configuredtrust r = (\l -> Just (Types.Remote.uuid r, l)) + =<< readTrustLevel + =<< remoteAnnexTrustLevel (Types.Remote.gitconfig r) {- Does not include forcetrust or git config values, just those from the - log file. -} |