optimize index updating

The last branch ref that the index was updated to is stored in
.git/annex/index.lck, and the index only updated when the current
branch ref differs.

(The .lck file should later be used for locking too.)

Some more optimization is still needed, since there is some redundancy in
calls to git show-ref.
This commit is contained in:
Joey Hess 2011-12-11 16:11:13 -04:00
parent 8680c415de
commit cfbbda99f4
4 changed files with 52 additions and 14 deletions

View file

@ -42,5 +42,5 @@ main = do
_ <- Git.useIndex (tmpIndex g)
setup g
Git.UnionMerge.merge aref bref g
Git.commit "union merge" newref [aref, bref] g
_ <- Git.commit "union merge" newref [aref, bref] g
cleanup g