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.
This commit is contained in:
parent
4c8770c646
commit
cfe0894736
1 changed files with 4 additions and 4 deletions
|
@ -91,10 +91,10 @@ mergeFile g (info, file) = case filter (/= nullsha) [asha, bsha] of
|
||||||
- with the specified parent refs. -}
|
- with the specified parent refs. -}
|
||||||
commit :: Git.Repo -> String -> String -> [String] -> IO ()
|
commit :: Git.Repo -> String -> String -> [String] -> IO ()
|
||||||
commit g message newref parentrefs = do
|
commit g message newref parentrefs = do
|
||||||
tree <- Git.getSha "write-tree" $ ignorehandle $
|
tree <- Git.getSha "write-tree" $
|
||||||
pipeFrom "git" ["write-tree"]
|
Git.pipeRead g [Param "write-tree"]
|
||||||
sha <- Git.getSha "commit-tree" $ ignorehandle $
|
sha <- Git.getSha "commit-tree" $ ignorehandle $
|
||||||
pipeBoth "git" (["commit-tree", tree] ++ ps) message
|
Git.pipeWriteRead g (map Param $ ["commit-tree", tree] ++ ps) message
|
||||||
Git.run g "update-ref" [Param newref, Param sha]
|
Git.run g "update-ref" [Param newref, Param sha]
|
||||||
where
|
where
|
||||||
ignorehandle a = return . snd =<< a
|
ignorehandle a = return . snd =<< a
|
||||||
|
|
Loading…
Reference in a new issue