add journaling to speed up changes to the git-annex branch

git is slow when the index file is large and has to be rewritten each time
a file is changed. To speed this up, added a journal where changes are
recorded before being fed into the index file and committed to the
git-annex branch. The entire journal can be fed into git with just 2
commands, and only one write of the index file.
This commit is contained in:
Joey Hess 2011-06-23 11:37:26 -04:00
parent 23e765b67c
commit 5f494154a3
7 changed files with 132 additions and 40 deletions

View file

@ -9,10 +9,9 @@ module Types.BranchState where
data BranchState = BranchState {
branchUpdated :: Bool,
branchChanged :: Bool,
cachedFile :: Maybe FilePath,
cachedContent :: String
}
startBranchState :: BranchState
startBranchState = BranchState False False Nothing ""
startBranchState = BranchState False Nothing ""