add annex-proxied

This makes git-annex sync and similar not treat proxied remotes as git
syncable remotes.

Also, display in git-annex info remote when the remote is proxied.
This commit is contained in:
Joey Hess 2024-06-24 10:13:13 -04:00
parent 0c111fc96a
commit b8016eeb65
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 31 additions and 14 deletions

View file

@ -449,11 +449,13 @@ claimingUrl' remotefilter url = do
checkclaim = maybe (pure False) (`id` url) . claimUrl
{- Is this a remote of a type that git pull and push work with?
- That includes special remotes with an annex:: url configured. -}
- That includes special remotes with an annex:: url configured.
- It does not include proxied remotes. -}
gitSyncableRemote :: Remote -> Bool
gitSyncableRemote r
| gitSyncableRemoteType (remotetype r)
&& isJust (remoteUrl (gitconfig r)) = True
&& isJust (remoteUrl (gitconfig r)) =
not (remoteAnnexProxied (gitconfig r))
| otherwise = case remoteUrl (gitconfig r) of
Just u | "annex::" `isPrefixOf` u -> True
_ -> False