allow proxying to remotes that are nodes of clusters
fixes reversion in ca08f3fcc2
This commit is contained in:
parent
f18740699e
commit
f916ce4b68
1 changed files with 5 additions and 1 deletions
|
@ -204,8 +204,12 @@ checkProxy remoteuuid ouruuid = M.lookup ouruuid <$> getProxies >>= \case
|
|||
-- be used as a proxy.
|
||||
proxyfor ps = do
|
||||
rs <- concat . byCost <$> remoteList
|
||||
myclusters <- annexClusters <$> Annex.getGitConfig
|
||||
let sameuuid r = uuid r == remoteuuid
|
||||
let proxyconfigured = remoteAnnexProxy . R.gitconfig
|
||||
-- Only proxy for a remote when the git configuration
|
||||
-- allows it.
|
||||
let proxyconfigured r = remoteAnnexProxy (R.gitconfig r)
|
||||
|| (any (`M.member` myclusters) $ fromMaybe [] $ remoteAnnexClusterNode $ R.gitconfig r)
|
||||
let samename r p = name r == proxyRemoteName p
|
||||
case headMaybe (filter (\r -> sameuuid r && proxyconfigured r && any (samename r) ps) rs) of
|
||||
Nothing -> notconfigured
|
||||
|
|
Loading…
Reference in a new issue