summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-08 16:01:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-08 16:01:46 -0400
commite3f1568e0ff7dc872f3782115c74b9e7d8c291b2 (patch)
treedab3d9797fe1ff96d22baf88c45d9e66b827c905 /Annex.hs
parent2568beee07928d1bd462d631372881f146b190ee (diff)
Fix caching of decrypted ciphers, which failed when drop had to check multiple different encrypted special remotes.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex.hs b/Annex.hs
index 6d245a92d..d8d9c63b4 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -36,6 +36,7 @@ import Types.BranchState
import Types.TrustLevel
import Types.UUID
import qualified Utility.Matcher
+import qualified Data.Map as M
-- git-annex's monad
newtype Annex a = Annex { runAnnex :: StateT AnnexState IO a }
@@ -70,7 +71,7 @@ data AnnexState = AnnexState
, limit :: Either [Utility.Matcher.Token (FilePath -> Annex Bool)] (Utility.Matcher.Matcher (FilePath -> Annex Bool))
, forcetrust :: [(UUID, TrustLevel)]
, trustmap :: Maybe TrustMap
- , cipher :: Maybe Cipher
+ , ciphers :: M.Map EncryptedCipher Cipher
}
newState :: Git.Repo -> AnnexState
@@ -93,7 +94,7 @@ newState gitrepo = AnnexState
, limit = Left []
, forcetrust = []
, trustmap = Nothing
- , cipher = Nothing
+ , ciphers = M.empty
}
{- Create and returns an Annex state object for the specified git repo. -}