simplification now that all logs use Builder

This commit is contained in:
Joey Hess 2019-01-09 14:10:05 -04:00
parent 2fef43dd71
commit 232b1a08f3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 13 additions and 7 deletions

View file

@ -19,6 +19,7 @@ import Utility.Tmp
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.ByteString.Builder
type HashObjectHandle = CoProcess.CoProcessHandle
@ -49,6 +50,9 @@ instance HashableBlob L.ByteString where
instance HashableBlob S.ByteString where
hashableBlobToHandle = S.hPut
instance HashableBlob Builder where
hashableBlobToHandle = hPutBuilder
{- Injects a blob into git. Unfortunately, the current git-hash-object
- interface does not allow batch hashing without using temp files. -}
hashBlob :: HashableBlob b => HashObjectHandle -> b -> IO Sha