summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-07-05 18:31:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-07-05 19:57:46 -0400
commit9f1577f74684d8d627e75d3021eb1ff50ef7492f (patch)
tree840a7331189550e93a2ea684bceeb97b4c05b1aa /Annex.hs
parent674768abac3efb2646479c6afba76d9ff27fd802 (diff)
remove unused backend machinery
The only remaining vestiage of backends is different types of keys. These are still called "backends", mostly to avoid needing to change user interface and configuration. But everything to do with storing keys in different backends was gone; instead different types of remotes are used. In the refactoring, lots of code was moved out of odd corners like Backend.File, to closer to where it's used, like Command.Drop and Command.Fsck. Quite a lot of dead code was removed. Several data structures became simpler, which may result in better runtime efficiency. There should be no user-visible changes.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/Annex.hs b/Annex.hs
index c21cfb37c..f7e3e29f8 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -34,7 +34,6 @@ type Annex = StateT AnnexState IO
data AnnexState = AnnexState
{ repo :: Git.Repo
, backends :: [Backend Annex]
- , supportedBackends :: [Backend Annex]
, remotes :: [Remote Annex]
, repoqueue :: Queue
, quiet :: Bool
@@ -52,12 +51,11 @@ data AnnexState = AnnexState
, cipher :: Maybe Cipher
}
-newState :: [Backend Annex] -> Git.Repo -> AnnexState
-newState allbackends gitrepo = AnnexState
+newState :: Git.Repo -> AnnexState
+newState gitrepo = AnnexState
{ repo = gitrepo
, backends = []
, remotes = []
- , supportedBackends = allbackends
, repoqueue = empty
, quiet = False
, force = False
@@ -75,9 +73,8 @@ newState allbackends gitrepo = AnnexState
}
{- Create and returns an Annex state object for the specified git repo. -}
-new :: Git.Repo -> [Backend Annex] -> IO AnnexState
-new gitrepo allbackends =
- newState allbackends `liftM` (liftIO . Git.configRead) gitrepo
+new :: Git.Repo -> IO AnnexState
+new gitrepo = newState `liftM` (liftIO . Git.configRead) gitrepo
{- performs an action in the Annex monad -}
run :: AnnexState -> Annex a -> IO (a, AnnexState)