simplification now that all logs use Builder
This commit is contained in:
parent
2fef43dd71
commit
232b1a08f3
3 changed files with 13 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue