performance fix

It was checking if it needed to merge on every branch access, fix it to
only check once.
This commit is contained in:
Joey Hess 2011-10-07 13:38:56 -04:00
parent 44fc358885
commit 82e655efd0

View file

@ -153,8 +153,8 @@ update = do
-}
liftIO $ Git.UnionMerge.merge_index g branches
liftIO $ Git.commit g "update" fullname (nub $ fullname:refs)
Annex.changeState $ \s -> s { Annex.branchstate = state { branchUpdated = True } }
invalidateCache
Annex.changeState $ \s -> s { Annex.branchstate = state { branchUpdated = True } }
where
changedbranch (_, branch) = do
g <- gitRepo