summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-06 16:08:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-06 16:08:36 -0400
commitbc1d3479d755fd4c33f678c3081484dd9282e789 (patch)
tree4168f62280428fd3893eda31e2acc4f3a23d6c6d
parent4d709ee813293281e41216bb819f845dadd508b0 (diff)
cleanup
-rw-r--r--Assistant/Ssh.hs1
-rw-r--r--Assistant/XMPP/Git.hs16
2 files changed, 15 insertions, 2 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index 46574482f..01e44f31b 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -88,7 +88,6 @@ sshTranscript opts input = do
hClose readh
ok <- checkSuccessProcess pid
- return ()
return (transcript, ok)
{- Ensure that the ssh public key doesn't include any ssh options, like
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index ea14e09cc..37535d01c 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -169,4 +169,18 @@ xmppGitRelay = do
{- Relays git receive-pack to and from XMPP, and propigates its exit status. -}
xmppReceivePack :: Assistant Bool
-xmppReceivePack = error "TODO"
+xmppReceivePack = do
+ feeder <- asIO1 toxmpp
+ reader <- asIO1 fromxmpp
+ ok <- liftIO $ do
+ (Just inh, Just outh, _, pid) <- createProcess $ p
+ { std_in = CreatePipe
+ , std_out = CreatePipe
+ , std_err = Inherit
+ }
+
+ liftIO $ mapM_ killThread [t1, t2]
+ where
+ p = proc "git" params
+ toxmpp =
+ fromxmpp =