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

@ -42,7 +42,7 @@ main :: IO ()
main = do
[aref, bref, newref] <- parseArgs
g <- Git.configRead =<< Git.repoFromCwd
Git.useIndex (tmpIndex g)
_ <- Git.useIndex (tmpIndex g)
setup g
GitUnionMerge.merge g [aref, bref]
GitUnionMerge.commit g "union merge" newref [aref, bref]