aboutsummaryrefslogtreecommitdiff
path: root/Git/HashObject.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-31 12:20:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-31 12:42:13 -0400
commited73317dbdd1d822b1fbb15b249a330e453e6293 (patch)
treed3c792719b01583e2cc21a9a66f44a26a1d61bed /Git/HashObject.hs
parent8ca051c47ed0d326588ffb84203b4dc390b611cb (diff)
Can now restart certain long-running git processes if they crash, and continue working.
Fuzz tests have shown that git cat-file --batch sometimes stops running. It's not yet known why (no error message; repo seems ok). But this is something we can deal with in the CoProcess framework, since all 3 types of long-running git processes should be restartable if they fail. Note that, as implemented, only IO errors are caught. So an error thrown by the reveiver, when it sees something that is not valid output from git cat-file (etc) will not cause a restart. I don't want it to retry if git commands change their output or are just outputting garbage. This does mean that if the command did a partial output and crashed in the middle, it would still not be restarted. There is currently no guard against restarting a command repeatedly, if, for example, it crashes repeatedly on startup.
Diffstat (limited to 'Git/HashObject.hs')
-rw-r--r--Git/HashObject.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/HashObject.hs b/Git/HashObject.hs
index bf3ca7f8b..1991ea4a5 100644
--- a/Git/HashObject.hs
+++ b/Git/HashObject.hs
@@ -17,7 +17,7 @@ import qualified Utility.CoProcess as CoProcess
type HashObjectHandle = CoProcess.CoProcessHandle
hashObjectStart :: Repo -> IO HashObjectHandle
-hashObjectStart = CoProcess.rawMode <=< gitCoProcessStart
+hashObjectStart = CoProcess.rawMode <=< gitCoProcessStart True
[ Param "hash-object"
, Param "-w"
, Param "--stdin-paths"