diff --git a/Command/Sync.hs b/Command/Sync.hs index 62b557ccc7..ff76307ab5 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -268,7 +268,8 @@ seek' o = startConcurrency transferStages $ do remotes <- syncRemotes (syncWith o) warnSyncContentTransition o remotes -- Remotes that git can push to and pull from. - let gitremotes = filter Remote.gitSyncableRemote remotes + let gitremotes = nubBy sameGitRepo $ + filter Remote.gitSyncableRemote remotes -- Remotes that contain annex object content. contentremotes <- filter (\r -> Remote.uuid r /= NoUUID) <$> filterM (not <$$> liftIO . getDynamicConfig . remoteAnnexIgnore . Remote.gitconfig) remotes @@ -1158,3 +1159,7 @@ splitRemoteAnnexTrackingBranchSubdir tb = (branch, subdir) subdir = if S.null p then Nothing else Just (asTopFilePath p) + +sameGitRepo :: Remote -> Remote -> Bool +sameGitRepo x y = + remoteUrl (Remote.gitconfig x) == remoteUrl (Remote.gitconfig y) diff --git a/Remote.hs b/Remote.hs index 501f010b2e..7297c5353a 100644 --- a/Remote.hs +++ b/Remote.hs @@ -451,7 +451,8 @@ claimingUrl' remotefilter url = do - with an annex:: url configured? -} gitSyncableRemote :: Remote -> Bool gitSyncableRemote r - | gitSyncableRemoteType (remotetype r) = True + | gitSyncableRemoteType (remotetype r) + && isJust (remoteUrl (gitconfig r)) = True | otherwise = case remoteUrl (gitconfig r) of Just u | "annex::" `isPrefixOf` u -> True _ -> False diff --git a/doc/todo/git-annex_proxies.mdwn b/doc/todo/git-annex_proxies.mdwn index 6faa9876a0..b63fc865ae 100644 --- a/doc/todo/git-annex_proxies.mdwn +++ b/doc/todo/git-annex_proxies.mdwn @@ -44,11 +44,6 @@ For June's work on [[design/passthrough_proxy]], implementation plan: * Consider getting instantiated remotes into git remote list. See design. -* Make commands like `git-annex sync` not git push/pull to proxied remotes. - That doesn't work because they have no url. Or, if proxied remotes are in - git remote list, it is unncessary work because it's the same url as the - proxy. - * Implement single upload with fanout to proxied remotes. * Implement clusters.