use getSha

This commit is contained in:
Joey Hess 2016-02-23 18:30:11 -04:00
parent fc072699b7
commit e266a6ec78
Failed to extract signature

View file

@ -17,6 +17,7 @@ import Git
import Git.FilePath import Git.FilePath
import Git.Types import Git.Types
import Git.Command import Git.Command
import Git.Sha
import qualified Git.LsTree as LsTree import qualified Git.LsTree as LsTree
import qualified Utility.CoProcess as CoProcess import qualified Utility.CoProcess as CoProcess
@ -101,7 +102,7 @@ mkTree cp l = CoProcess.query cp send receive
RecordedSubTree f s _ -> mkTreeOutput 0o040000 TreeObject s f RecordedSubTree f s _ -> mkTreeOutput 0o040000 TreeObject s f
NewSubTree _ _ -> error "recordSubTree internal error; unexpected NewSubTree" NewSubTree _ _ -> error "recordSubTree internal error; unexpected NewSubTree"
hPutStr h "\NUL" -- signal end of tree to --batch hPutStr h "\NUL" -- signal end of tree to --batch
receive h = Ref <$> hGetLine h receive h = getSha "mktree" (hGetLine h)
mkTreeOutput :: FileMode -> ObjectType -> Sha -> TopFilePath -> String mkTreeOutput :: FileMode -> ObjectType -> Sha -> TopFilePath -> String
mkTreeOutput fm ot s f = concat mkTreeOutput fm ot s f = concat