use xmpp::user@host for xmpp remotes
Inject the required git-remote-xmpp into PATH when running xmpp git push. Rest of the time it will not be in PATH, and git won't be able to talk to xmpp remotes.
This commit is contained in:
parent
de7b8ed6b0
commit
82ccb385e3
3 changed files with 44 additions and 19 deletions
|
@ -20,5 +20,22 @@ seek = [withWords start]
|
|||
|
||||
start :: [String] -> CommandStart
|
||||
start _ = do
|
||||
liftIO gitRemoteHelper
|
||||
liftIO xmppGitRelay
|
||||
stop
|
||||
|
||||
{- A basic implementation of the git-remote-helpers protocol. -}
|
||||
gitRemoteHelper :: IO ()
|
||||
gitRemoteHelper = do
|
||||
expect "capabilities"
|
||||
respond ["connect"]
|
||||
expect "connect git-receive-pack"
|
||||
respond []
|
||||
where
|
||||
expect s = do
|
||||
cmd <- getLine
|
||||
unless (cmd == s) $
|
||||
error $ "git-remote-helpers protocol error: expected: " ++ s ++ ", but got: " ++ cmd
|
||||
respond l = do
|
||||
mapM_ putStrLn l
|
||||
putStrLn ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue