refactor catfile code

split into generic IO code, and a thin Annex wrapper
This commit is contained in:
Joey Hess 2011-09-28 15:15:42 -04:00
parent 4f4eaf387a
commit ad245a6375
5 changed files with 96 additions and 48 deletions

View file

@ -24,6 +24,7 @@ import Control.Monad.IO.Control
import Control.Applicative hiding (empty)
import qualified Git
import Git.CatFile
import Git.Queue
import Types.Backend
import qualified Types.Remote
@ -55,6 +56,7 @@ data AnnexState = AnnexState
, fast :: Bool
, auto :: Bool
, branchstate :: BranchState
, catfilehandle :: Maybe CatFileHandle
, forcebackend :: Maybe String
, forcenumcopies :: Maybe Int
, defaultkey :: Maybe String
@ -79,6 +81,7 @@ newState gitrepo = AnnexState
, fast = False
, auto = False
, branchstate = startBranchState
, catfilehandle = Nothing
, forcebackend = Nothing
, forcenumcopies = Nothing
, defaultkey = Nothing