diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-01 14:03:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-01 14:03:59 -0400 |
commit | 3d3a578e2e471437f3b0c893f207e863f3749374 (patch) | |
tree | 072afbb4df63570b85bac33b9d9769ed1118eaaa /Git/Tree.hs | |
parent | 8d16ba5f1f241318e4a912d86cd70c3f4242a22a (diff) |
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.
Diffstat (limited to 'Git/Tree.hs')
-rw-r--r-- | Git/Tree.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/Tree.hs b/Git/Tree.hs index c341e1f5b..282643f49 100644 --- a/Git/Tree.hs +++ b/Git/Tree.hs @@ -59,7 +59,7 @@ newtype MkTreeHandle = MkTreeHandle CoProcess.CoProcessHandle withMkTreeHandle :: (MonadIO m, MonadMask m) => Repo -> (MkTreeHandle -> m a) -> m a withMkTreeHandle repo a = bracketIO setup cleanup (a . MkTreeHandle) where - setup = CoProcess.rawMode =<< gitCoProcessStart False ps repo + setup = gitCoProcessStart False ps repo ps = [Param "mktree", Param "--batch", Param "-z"] cleanup = CoProcess.stop |