summaryrefslogtreecommitdiff
path: root/Git/Command.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-12-24 14:53:58 -0400
committerJoey Hess <joeyh@joeyh.name>2016-12-24 14:53:58 -0400
commit122b09e2f24cff55c65b84cbccd78ed640a234be (patch)
tree5f9f1929b2fccb9d9a783a0a53f56ba13aae7897 /Git/Command.hs
parent1b18f539f2bace903c853ce828902a8061007da5 (diff)
downloadgit-repair-122b09e2f24cff55c65b84cbccd78ed640a234be.tar.gz
Merge from git-annex.
Diffstat (limited to 'Git/Command.hs')
-rw-r--r--Git/Command.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Git/Command.hs b/Git/Command.hs
index 2060563..adea762 100644
--- a/Git/Command.hs
+++ b/Git/Command.hs
@@ -53,7 +53,6 @@ runQuiet params repo = withQuietOutput createProcessSuccess $
pipeReadLazy :: [CommandParam] -> Repo -> IO (String, IO Bool)
pipeReadLazy params repo = assertLocal repo $ do
(_, Just h, _, pid) <- createProcess p { std_out = CreatePipe }
- fileEncoding h
c <- hGetContents h
return (c, checkSuccessProcess pid)
where
@@ -66,7 +65,6 @@ pipeReadLazy params repo = assertLocal repo $ do
pipeReadStrict :: [CommandParam] -> Repo -> IO String
pipeReadStrict params repo = assertLocal repo $
withHandle StdoutHandle (createProcessChecked ignoreFailureProcess) p $ \h -> do
- fileEncoding h
output <- hGetContentsStrict h
hClose h
return output
@@ -81,9 +79,7 @@ pipeWriteRead params writer repo = assertLocal repo $
writeReadProcessEnv "git" (toCommand $ gitCommandLine params repo)
(gitEnv repo) writer (Just adjusthandle)
where
- adjusthandle h = do
- fileEncoding h
- hSetNewlineMode h noNewlineTranslation
+ adjusthandle h = hSetNewlineMode h noNewlineTranslation
{- Runs a git command, feeding it input on a handle with an action. -}
pipeWrite :: [CommandParam] -> Repo -> (Handle -> IO ()) -> IO ()