remove no longer needed uuid check in prepSocket
Since3dd43df9c2
, the socket warmup does not run git-annex-shell on the remote host, and the point of this check was to avoid error messages running git-annex-shell when it was not installed. So the check is not needed any longer. Also, this is one of only two uses of remoteGitConfig, which I want to get rid of for reasons explained infc5888300f
. This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
parent
fc5888300f
commit
b94294a43d
1 changed files with 5 additions and 7 deletions
12
Annex/Ssh.hs
12
Annex/Ssh.hs
|
@ -73,7 +73,7 @@ sshOptions cs (host, port) gc opts = go =<< sshCachingInfo (host, port)
|
||||||
where
|
where
|
||||||
go (Nothing, params) = return $ mkparams cs params
|
go (Nothing, params) = return $ mkparams cs params
|
||||||
go (Just socketfile, params) = do
|
go (Just socketfile, params) = do
|
||||||
prepSocket socketfile gc host (mkparams NoConsumeStdin params)
|
prepSocket socketfile host (mkparams NoConsumeStdin params)
|
||||||
|
|
||||||
return $ mkparams cs params
|
return $ mkparams cs params
|
||||||
mkparams cs' ps = concat
|
mkparams cs' ps = concat
|
||||||
|
@ -167,8 +167,8 @@ portParams (Just port) = [Param "-p", Param $ show port]
|
||||||
- Locks the socket lock file to prevent other git-annex processes from
|
- Locks the socket lock file to prevent other git-annex processes from
|
||||||
- stopping the ssh multiplexer on this socket.
|
- stopping the ssh multiplexer on this socket.
|
||||||
-}
|
-}
|
||||||
prepSocket :: FilePath -> RemoteGitConfig -> SshHost -> [CommandParam] -> Annex ()
|
prepSocket :: FilePath -> SshHost -> [CommandParam] -> Annex ()
|
||||||
prepSocket socketfile gc sshhost sshparams = do
|
prepSocket socketfile sshhost sshparams = do
|
||||||
-- There could be stale ssh connections hanging around
|
-- There could be stale ssh connections hanging around
|
||||||
-- from a previous git-annex run that was interrupted.
|
-- from a previous git-annex run that was interrupted.
|
||||||
-- This must run only once, before we have made any ssh connection,
|
-- This must run only once, before we have made any ssh connection,
|
||||||
|
@ -190,9 +190,7 @@ prepSocket socketfile gc sshhost sshparams = do
|
||||||
let socketlock = socket2lock socketfile
|
let socketlock = socket2lock socketfile
|
||||||
|
|
||||||
Annex.getState Annex.concurrency >>= \case
|
Annex.getState Annex.concurrency >>= \case
|
||||||
Concurrent {}
|
Concurrent {} -> makeconnection socketlock
|
||||||
| annexUUID (remoteGitConfig gc) /= NoUUID ->
|
|
||||||
makeconnection socketlock
|
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
||||||
lockFileCached socketlock
|
lockFileCached socketlock
|
||||||
|
@ -389,7 +387,7 @@ sshOptionsTo remote gc localr
|
||||||
case msockfile of
|
case msockfile of
|
||||||
Nothing -> use []
|
Nothing -> use []
|
||||||
Just sockfile -> do
|
Just sockfile -> do
|
||||||
prepSocket sockfile gc sshhost $ concat
|
prepSocket sockfile sshhost $ concat
|
||||||
[ cacheparams
|
[ cacheparams
|
||||||
, map Param (remoteAnnexSshOptions gc)
|
, map Param (remoteAnnexSshOptions gc)
|
||||||
, portParams port
|
, portParams port
|
||||||
|
|
Loading…
Reference in a new issue