These remotes have no url configured, so git pull and push will fail.
git-annex sync --content etc can still sync with them otherwise.
Also, avoid git syncing twice with the same url. This is for cases where
a proxied remote has been manually configured and so does have a url.
Or perhaps proxied remotes will get configured like that automatically
later.
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
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)
- 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
* 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.