refactor p2p remote action code
Make a Remote.Helper.P2P using code that was in Remote.P2P, converted to use generic protocol runner actions. This will allow it to be reused in Remote.Git. This commit was sponsored by mo on Patreon.
This commit is contained in:
parent
c036a380b2
commit
16af259209
4 changed files with 83 additions and 55 deletions
|
@ -758,8 +758,8 @@ mkDeferredUUIDCheck r u gc
|
|||
|
||||
-- Runs a P2P Proto action on a remote when it supports that,
|
||||
-- otherwise the fallback action.
|
||||
runSsh :: Remote -> Ssh.P2PSshConnectionPool -> P2P.Proto a -> Annex a -> Annex a
|
||||
runSsh r connpool proto fallback =
|
||||
runSsh :: Remote -> Ssh.P2PSshConnectionPool -> Annex a -> P2P.Proto a -> Annex a
|
||||
runSsh r connpool fallback proto =
|
||||
Ssh.getP2PSshConnection r connpool >>= maybe fallback go
|
||||
where
|
||||
go c = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue