ByteString Ref continued

Several nice speed wins I think.

At 340/633 files converted.
This commit is contained in:
Joey Hess 2020-04-07 13:27:11 -04:00
parent d5d8259937
commit 6c81e0c8f1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
16 changed files with 124 additions and 99 deletions

View file

@ -38,6 +38,7 @@ import System.Posix.Types
import Control.Monad.IO.Class
import qualified Data.Set as S
import qualified Data.Map as M
import qualified Data.ByteString.Char8 as S8
newtype Tree = Tree [TreeContent]
deriving (Show)
@ -106,7 +107,7 @@ mkTree (MkTreeHandle cp) l = CoProcess.query cp send receive
NewSubTree _ _ -> error "recordSubTree internal error; unexpected NewSubTree"
TreeCommit f fm s -> mkTreeOutput fm CommitObject s f
hPutStr h "\NUL" -- signal end of tree to --batch
receive h = getSha "mktree" (hGetLine h)
receive h = getSha "mktree" (S8.hGetLine h)
treeMode :: FileMode
treeMode = 0o040000