2015-03-16 19:28:29 +00:00
|
|
|
{- git-remote-daemon, gcrypt transport
|
|
|
|
-
|
|
|
|
- Copyright 2015 Joey Hess <id@joeyh.name>
|
|
|
|
-
|
2019-03-13 19:48:14 +00:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2015-03-16 19:28:29 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
module RemoteDaemon.Transport.GCrypt (transport) where
|
|
|
|
|
2016-01-20 20:36:33 +00:00
|
|
|
import Annex.Common
|
2015-03-16 19:28:29 +00:00
|
|
|
import RemoteDaemon.Types
|
|
|
|
import RemoteDaemon.Common
|
|
|
|
import RemoteDaemon.Transport.Ssh (transportUsingCmd)
|
|
|
|
import Git.GCrypt
|
|
|
|
import Remote.Helper.Ssh
|
|
|
|
import Remote.GCrypt (accessShellConfig)
|
2017-02-15 19:08:46 +00:00
|
|
|
import Annex.Ssh
|
2015-03-16 19:28:29 +00:00
|
|
|
|
|
|
|
transport :: Transport
|
2016-06-02 20:34:52 +00:00
|
|
|
transport rr@(RemoteRepo r gc) url h@(TransportHandle (LocalRepo g) _) ichan ochan
|
2015-03-16 19:28:29 +00:00
|
|
|
| accessShellConfig gc = do
|
|
|
|
r' <- encryptedRemote g r
|
2017-02-15 19:08:46 +00:00
|
|
|
v <- liftAnnex h $ git_annex_shell ConsumeStdin r' "notifychanges" [] []
|
2015-03-16 19:28:29 +00:00
|
|
|
case v of
|
|
|
|
Nothing -> noop
|
|
|
|
Just (cmd, params) ->
|
|
|
|
transportUsingCmd cmd params rr url h ichan ochan
|
|
|
|
| otherwise = noop
|