set handles to binary mode

This commit is contained in:
Joey Hess 2014-11-18 16:45:31 -04:00
parent 66b4adfff6
commit 12aa7f4948
1 changed files with 2 additions and 0 deletions

View File

@ -323,6 +323,8 @@ gitPush hin hout = void $ fromstdin `concurrently` tostdout
h <- fdToHandle hin
connect h stdout
connect fromh toh = do
hSetBinaryMode fromh True
hSetBinaryMode toh True
b <- B.hGetSome fromh 40960
hPutStrLn stderr $ show ("from", fromh, "to", toh, b)
if B.null b