Fix a crash when merging files in the git-annex branch that contain invalid utf8.

The crash actually occurred when writing out the file, which was done to a
handle that had not had fileSystemEncoding applied to it.
This commit is contained in:
Joey Hess 2012-10-12 12:19:30 -04:00
parent aa8b15d966
commit e05c21cb73
4 changed files with 17 additions and 5 deletions

View file

@ -73,7 +73,7 @@ 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
(gitEnv repo) s (Just fileEncoding)
{- Runs a git subcommand, feeding it input on a handle with an action. -}
pipeWrite :: [CommandParam] -> Repo -> (Handle -> IO ()) -> IO ()