summaryrefslogtreecommitdiff
path: root/Git/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-15 17:25:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-15 17:43:37 -0400
commit0b63ee6cd56f57f172695cd25b7c7ec89281ba7e (patch)
tree669a76799c46898e9dad846bb245395a234b39b6 /Git/Command.hs
parente1baf48d8853a5015009fe822a125192bb952222 (diff)
run git coprocesses with gitEnv
Diffstat (limited to 'Git/Command.hs')
-rw-r--r--Git/Command.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Git/Command.hs b/Git/Command.hs
index 04b0723d0..431569559 100644
--- a/Git/Command.hs
+++ b/Git/Command.hs
@@ -13,6 +13,7 @@ import System.Process
import Common
import Git
import Git.Types
+import qualified Utility.CoProcess as CoProcess
{- Constructs a git command line operating on the specified repo. -}
gitCommandLine :: [CommandParam] -> Repo -> [CommandParam]
@@ -80,3 +81,7 @@ reap = do
-- throws an exception when there are no child processes
catchDefaultIO (getAnyProcessStatus False True) Nothing
>>= maybe noop (const reap)
+
+{- Runs a git command as a coprocess. -}
+gitCoProcessStart :: [CommandParam] -> Repo -> IO CoProcess.CoProcessHandle
+gitCoProcessStart params repo = CoProcess.start "git" (toCommand $ gitCommandLine params repo) (gitEnv repo)