git-hash-object needs absolute files (git bug)

A relative path to a file makes it fail. I am pretty sure this is a git
bug; workaround it.
This commit is contained in:
Joey Hess 2015-01-06 17:33:29 -04:00
parent d8a2f658dd
commit d44b28437d

View file

@ -32,7 +32,7 @@ hashObjectStop = CoProcess.stop
hashFile :: HashObjectHandle -> FilePath -> IO Sha
hashFile h file = CoProcess.query h send receive
where
send to = hPutStrLn to file
send to = hPutStrLn to =<< absPath file
receive from = getSha "hash-object" $ hGetLine from
{- Injects a blob into git. Unfortunately, the current git-hash-object