diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 20:35:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 20:35:09 -0400 |
commit | cfe0894736aaabf320d080ac098ce0a65279fe27 (patch) | |
tree | 5a07ea538f23bda83fedfdf946eda96cb726cc95 | |
parent | 4c8770c646c41598b73b3c86280514f1068e0d36 (diff) |
merge bugfix
Use GitRepo functions to call git, the bug occurred when it was run
in a git repo that was not the same as the repo being acted on.
-rw-r--r-- | GitUnionMerge.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/GitUnionMerge.hs b/GitUnionMerge.hs index 267376ed5..096a153a4 100644 --- a/GitUnionMerge.hs +++ b/GitUnionMerge.hs @@ -91,10 +91,10 @@ mergeFile g (info, file) = case filter (/= nullsha) [asha, bsha] of - with the specified parent refs. -} commit :: Git.Repo -> String -> String -> [String] -> IO () commit g message newref parentrefs = do - tree <- Git.getSha "write-tree" $ ignorehandle $ - pipeFrom "git" ["write-tree"] - sha <- Git.getSha "commit-tree" $ ignorehandle $ - pipeBoth "git" (["commit-tree", tree] ++ ps) message + tree <- Git.getSha "write-tree" $ + Git.pipeRead g [Param "write-tree"] + sha <- Git.getSha "commit-tree" $ ignorehandle $ + Git.pipeWriteRead g (map Param $ ["commit-tree", tree] ++ ps) message Git.run g "update-ref" [Param newref, Param sha] where ignorehandle a = return . snd =<< a |