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

@ -7,18 +7,13 @@
module Types.BranchState where
import System.IO
data BranchState = BranchState {
branchUpdated :: Bool, -- has the branch been updated this run?
-- (from, to) handles used to talk to a git-cat-file process
catFileHandles :: Maybe (Handle, Handle),
-- the content of one file is cached
cachedFile :: Maybe FilePath,
cachedContent :: String
}
startBranchState :: BranchState
startBranchState = BranchState False Nothing Nothing ""
startBranchState = BranchState False Nothing ""