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:
Joey Hess 2019-01-03 13:19:59 -04:00
parent 7d51b0c109
commit 53905490df
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 20 additions and 11 deletions

View file

@ -41,7 +41,7 @@ hashFile f = do
{- Note that the content will be written to a temp file.
- So it may be faster to use Git.HashObject.hashObject for large
- blob contents. -}
hashBlob :: String -> Annex Sha
hashBlob :: Git.HashObject.HashableBlob b => b -> Annex Sha
hashBlob content = do
h <- hashObjectHandle
liftIO $ Git.HashObject.hashBlob h content