diff options
author | Joey Hess <joey@kitenet.net> | 2013-06-18 14:58:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-06-18 15:08:51 -0400 |
commit | 6cee6c3d77e0f4389f0ccff13496cfd3bd05cc8c (patch) | |
tree | c6f5b36cb2ce6a963a220436ee1176b1cbc53d23 /Git | |
parent | 00c42cd6d2e9080f740248b37604e85b8dd2964d (diff) |
avoid newline translation when writing to git hash-object
They're like mushrooms, just keep popping up.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Command.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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 () |