diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-12 17:45:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-12 17:45:12 -0400 |
commit | 04edae6791b4eddaa77dda2407264dc4434d74b7 (patch) | |
tree | 3c42dfa812220f003b53cb47ce4ff1e73dd1f108 /Annex/Branch.hs | |
parent | cea65b9e5bf6bcc9a9350703dbbb0951c6e00c82 (diff) |
Optimised union merging; now only runs git cat-file once.
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r-- | Annex/Branch.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index fad818fb0..20134003d 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -149,7 +149,8 @@ update = onceonly $ do - documentation advises users not to directly - modify the branch. -} - inRepo $ \g -> Git.UnionMerge.merge_index g branches + h <- catFileHandle + inRepo $ \g -> Git.UnionMerge.merge_index h g branches ff <- if dirty then return False else tryFastForwardTo refs unless ff $ inRepo $ Git.commit merge_desc fullname (nub $ fullname:refs) @@ -280,7 +281,7 @@ get' staleok file = fromcache =<< getCache file fromjournal Nothing | staleok = withIndex frombranch | otherwise = withIndexUpdate $ frombranch >>= cache - frombranch = catFile fullname file + frombranch = L.unpack <$> catFile fullname file cache content = do setCache file content return content |