make LocalRepo a newtype

This commit is contained in:
Joey Hess 2016-06-02 16:34:52 -04:00
parent 8452ea45ca
commit 67f50e9cdd
Failed to extract signature
5 changed files with 8 additions and 8 deletions

View file

@ -16,7 +16,7 @@ import Remote.Helper.Ssh
import Remote.GCrypt (accessShellConfig)
transport :: Transport
transport rr@(RemoteRepo r gc) url h@(TransportHandle g _) ichan ochan
transport rr@(RemoteRepo r gc) url h@(TransportHandle (LocalRepo g) _) ichan ochan
| accessShellConfig gc = do
r' <- encryptedRemote g r
v <- liftAnnex h $ git_annex_shell r' "notifychanges" [] []

View file

@ -29,10 +29,10 @@ transport rr@(RemoteRepo r _) url h ichan ochan = do
Just (cmd, params) -> transportUsingCmd cmd params rr url h ichan ochan
transportUsingCmd :: FilePath -> [CommandParam] -> Transport
transportUsingCmd cmd params rr@(RemoteRepo r gc) url h@(TransportHandle g s) ichan ochan = do
transportUsingCmd cmd params rr@(RemoteRepo r gc) url h@(TransportHandle (LocalRepo g) s) ichan ochan = do
-- enable ssh connection caching wherever inLocalRepo is called
g' <- liftAnnex h $ sshOptionsTo r gc g
let transporthandle = TransportHandle g' s
let transporthandle = TransportHandle (LocalRepo g') s
transportUsingCmd' cmd params rr url transporthandle ichan ochan
transportUsingCmd' :: FilePath -> [CommandParam] -> Transport