add debugging

This commit is contained in:
Joey Hess 2012-07-17 14:40:05 -04:00
parent 1d5582091e
commit 182526ff68
8 changed files with 25 additions and 22 deletions

View file

@ -73,12 +73,12 @@ commit :: String -> Branch -> [Ref] -> Repo -> IO Sha
commit message branch parentrefs repo = do
tree <- getSha "write-tree" $
pipeRead [Param "write-tree"] repo
sha <- getSha "commit-tree" $
ignorehandle $ pipeWriteRead
(map Param $ ["commit-tree", show tree] ++ ps)
message repo
sha <- getSha "commit-tree" $ pipeWriteRead
(map Param $ ["commit-tree", show tree] ++ ps)
message repo
print ("got", sha)
run "update-ref" [Param $ show branch, Param $ show sha] repo
print ("update-ref done", sha)
return sha
where
ignorehandle a = snd <$> a
ps = concatMap (\r -> ["-p", show r]) parentrefs