git-annex/Types/BranchState.hs
Joey Hess e1c18ddec4 Sped back up fsck, copy --from etc
All commands that often have to read a lot of information from
the git-annex branch should now be nearly as fast as before
the branch was introduced.

Before fsck was taking approximatly 3 hours, now it's running in 8 minutes.

The code is very nasty. It should be rewritten to read the header line
from git cat-file, and then read the specified number of bytes of content.
2011-06-29 21:47:31 -04:00

24 lines
584 B
Haskell

{- git-annex BranchState data type
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
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 ""