summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Annex.hs b/Annex.hs
index e40e9468d..8f8936937 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -28,8 +28,9 @@ import Control.Monad.Base (liftBase, MonadBase)
import Common
import qualified Git
+import qualified Git.Config
import Git.CatFile
-import Git.Queue
+import qualified Git.Queue
import Types.Backend
import qualified Types.Remote
import Types.Crypto
@@ -37,6 +38,7 @@ import Types.BranchState
import Types.TrustLevel
import Types.UUID
import qualified Utility.Matcher
+import qualified Utility.Format
import qualified Data.Map as M
-- git-annex's monad
@@ -67,12 +69,12 @@ data AnnexState = AnnexState
{ repo :: Git.Repo
, backends :: [Backend Annex]
, remotes :: [Types.Remote.Remote Annex]
- , repoqueue :: Queue
+ , repoqueue :: Git.Queue.Queue
, output :: OutputType
, force :: Bool
, fast :: Bool
, auto :: Bool
- , print0 :: Bool
+ , format :: Maybe Utility.Format.Format
, branchstate :: BranchState
, catfilehandle :: Maybe CatFileHandle
, forcebackend :: Maybe String
@@ -90,12 +92,12 @@ newState gitrepo = AnnexState
{ repo = gitrepo
, backends = []
, remotes = []
- , repoqueue = Git.Queue.empty
+ , repoqueue = Git.Queue.new
, output = NormalOutput
, force = False
, fast = False
, auto = False
- , print0 = False
+ , format = Nothing
, branchstate = startBranchState
, catfilehandle = Nothing
, forcebackend = Nothing
@@ -110,7 +112,7 @@ newState gitrepo = AnnexState
{- Create and returns an Annex state object for the specified git repo. -}
new :: Git.Repo -> IO AnnexState
-new gitrepo = newState <$> Git.configRead gitrepo
+new gitrepo = newState <$> Git.Config.read gitrepo
{- performs an action in the Annex monad -}
run :: AnnexState -> Annex a -> IO (a, AnnexState)
@@ -125,7 +127,7 @@ getState = gets
{- Applies a state mutation function to change the internal state.
-
- - Example: changeState $ \s -> s { quiet = True }
+ - Example: changeState $ \s -> s { output = QuietOutput }
-}
changeState :: (AnnexState -> AnnexState) -> Annex ()
changeState = modify