restart coprocess in raw mode

Restarting a crashing git process could result in filename encoding issues
when not in a unicode locale, as the restarted processes's handles were not
read in raw mode.

Since rawMode is always used when starting a coprocess, didn't bother
to parameterise it and just always enable it for simplicity.

This commit was sponsored by Jake Vosloo on Patreon.
This commit is contained in:
Joey Hess 2016-11-01 14:03:55 -04:00
parent f08ad2f916
commit e23028d19b
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
7 changed files with 21 additions and 19 deletions

View file

@ -24,7 +24,7 @@ type Attr = String
checkAttrStart :: [Attr] -> Repo -> IO CheckAttrHandle
checkAttrStart attrs repo = do
currdir <- getCurrentDirectory
h <- CoProcess.rawMode =<< gitCoProcessStart True params repo
h <- gitCoProcessStart True params repo
oldgit <- Git.Version.older "1.7.7"
return (h, attrs, oldgit, currdir)
where