proxied exporttree=yes remotes are untrustworthy

This is not perfect because it does not handle versioned special
remotes, which should not be untrustworthy, but now are when proxied.

The implementation turned out to be easy, because the exporttree field
is a default field, so is available in RemoteConfig even for git
remotes.
This commit is contained in:
Joey Hess 2024-08-08 14:43:53 -04:00
parent b23c7f769e
commit 5c36177e58
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 18 deletions

View file

@ -229,7 +229,8 @@ gen r u rc gc rs
, gitconfig = gc
, readonly = Git.repoIsHttp r && not (isP2PHttp' gc)
, appendonly = False
, untrustworthy = False
, untrustworthy = isJust (remoteAnnexProxiedBy gc)
&& exportTree c
, availability = repoAvail r
, remotetype = remote
, mkUnavailable = unavailable r u rc gc rs