convert Git.HashObject to use ByteStrings
Both lazy and strict, because sometimes it's more efficient to build a small strict bytestring, and other times better to lazily stream.
This commit is contained in:
parent
7d51b0c109
commit
53905490df
4 changed files with 20 additions and 11 deletions
|
@ -85,7 +85,7 @@ mergeFile info file hashhandle h = case filter (/= nullSha) [Ref asha, Ref bsha]
|
|||
[] -> return Nothing
|
||||
(sha:[]) -> use sha
|
||||
shas -> use
|
||||
=<< either return (\s -> hashBlob hashhandle (unlines s))
|
||||
=<< either return (hashBlob hashhandle . encodeBS . unlines)
|
||||
=<< calcMerge . zip shas <$> mapM getcontents shas
|
||||
where
|
||||
[_colonmode, _bmode, asha, bsha, _status] = words info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue