summaryrefslogtreecommitdiff
path: root/Git/HashObject.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/HashObject.hs')
-rw-r--r--Git/HashObject.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Git/HashObject.hs b/Git/HashObject.hs
index bcad9a1..98bd440 100644
--- a/Git/HashObject.hs
+++ b/Git/HashObject.hs
@@ -36,10 +36,10 @@ hashObjectStop :: HashObjectHandle -> IO ()
hashObjectStop = CoProcess.stop
{- Injects a file into git, returning the Sha of the object. -}
-hashFile :: HashObjectHandle -> FilePath -> IO Sha
+hashFile :: HashObjectHandle -> RawFilePath -> IO Sha
hashFile h file = CoProcess.query h send receive
where
- send to = hPutStrLn to =<< absPath file
+ send to = S8.hPutStrLn to =<< absPath file
receive from = getSha "hash-object" $ S8.hGetLine from
class HashableBlob t where
@@ -60,7 +60,7 @@ hashBlob :: HashableBlob b => HashObjectHandle -> b -> IO Sha
hashBlob h b = withTmpFile "hash" $ \tmp tmph -> do
hashableBlobToHandle tmph b
hClose tmph
- hashFile h tmp
+ hashFile h (toRawFilePath tmp)
{- Injects some content into git, returning its Sha.
-