From 6cee6c3d77e0f4389f0ccff13496cfd3bd05cc8c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Jun 2013 14:58:38 -0400 Subject: avoid newline translation when writing to git hash-object They're like mushrooms, just keep popping up. --- Git/Command.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Git/Command.hs') diff --git a/Git/Command.hs b/Git/Command.hs index 648da985b..2d68540e6 100644 --- a/Git/Command.hs +++ b/Git/Command.hs @@ -78,7 +78,11 @@ pipeReadStrict params repo = assertLocal repo $ pipeWriteRead :: [CommandParam] -> String -> Repo -> IO String pipeWriteRead params s repo = assertLocal repo $ writeReadProcessEnv "git" (toCommand $ gitCommandLine params repo) - (gitEnv repo) s (Just fileEncoding) + (gitEnv repo) s (Just adjusthandle) + where + adjusthandle h = do + fileEncoding h + hSetNewlineMode h noNewlineTranslation {- Runs a git command, feeding it input on a handle with an action. -} pipeWrite :: [CommandParam] -> Repo -> (Handle -> IO ()) -> IO () -- cgit v1.2.3