summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-23 17:37:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-23 17:37:23 -0400
commitab9b971f8f772cf7e89a904d665bc88ddb3afd47 (patch)
tree77fcac11198f987f7979b2f0d447f54217d6bf6f
parent22243b87d2a43d6fd82581ef70a0537cb8ae8661 (diff)
simplified to use existing functions
-rw-r--r--Branch.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/Branch.hs b/Branch.hs
index 6e9dae9b9..fad024550 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -64,12 +64,7 @@ index g = gitAnnexDir g </> "index"
- and merge in changes from other branches.
-}
genIndex :: Git.Repo -> IO ()
-genIndex g = do
- ls <- Git.pipeNullSplit g $
- map Param ["ls-tree", "-z", "-r", "--full-tree", fullname]
- forceSuccess =<< Git.pipeWrite g
- (map Param ["update-index", "-z", "--index-info"])
- (join "\0" ls)
+genIndex g = GitUnionMerge.ls_tree g fullname >>= GitUnionMerge.update_index g
{- Runs an action using the branch's index file. -}
withIndex :: Annex a -> Annex a