diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-06 00:03:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-06 00:10:34 -0400 |
commit | f1bd72ea546be705334ba8f6d01d9dcfb0c33cf9 (patch) | |
tree | c14d5f0c567c34265526c23faa4743685d7f7bcd /Annex/Branch.hs | |
parent | 141fa3c94d9b5d9404b8e875b6806f27340f2cf3 (diff) |
factor out generic update-index code from unionmerge code
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r-- | Annex/Branch.hs | 9 |
1 files changed, 5 insertions, 4 deletions
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 |