From f1bd72ea546be705334ba8f6d01d9dcfb0c33cf9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Jun 2012 00:03:08 -0400 Subject: factor out generic update-index code from unionmerge code --- Annex/Branch.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Annex') diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 706522f3b..c8d0719b0 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -33,6 +33,7 @@ import qualified Git.Command import qualified Git.Ref import qualified Git.Branch import qualified Git.UnionMerge +import qualified Git.UpdateIndex import Git.HashObject import qualified Git.Index import Annex.CatFile @@ -258,8 +259,8 @@ files = withIndexUpdate $ do - in changes from other branches. -} genIndex :: Git.Repo -> IO () -genIndex g = Git.UnionMerge.stream_update_index g - [Git.UnionMerge.ls_tree fullname g] +genIndex g = Git.UpdateIndex.stream_update_index g + [Git.UpdateIndex.ls_tree fullname g] {- Merges the specified refs into the index. - Any changes staged in the index will be preserved. -} @@ -335,13 +336,13 @@ stageJournal = do g <- gitRepo withIndex $ liftIO $ do h <- hashObjectStart g - Git.UnionMerge.stream_update_index g + Git.UpdateIndex.stream_update_index g [genstream (gitAnnexJournalDir g) h fs] hashObjectStop h where genstream dir h fs streamer = forM_ fs $ \file -> do let path = dir file sha <- hashFile h path - _ <- streamer $ Git.UnionMerge.update_index_line + _ <- streamer $ Git.UpdateIndex.update_index_line sha (fileJournal file) removeFile path -- cgit v1.2.3