move untrust forcing from Logs.Trust into Remote

No behavior changes here, but this is groundwork for letting remotes
such as borg vary untrust forcing depending on configuration.
This commit is contained in:
Joey Hess 2020-12-28 15:08:53 -04:00
parent 5ce7fce74a
commit 36133f27c0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
22 changed files with 42 additions and 13 deletions

View file

@ -204,6 +204,16 @@ adjustExportImport' isexport isimport r rs = do
-- in confusing ways when there's an export
-- conflict (or an import conflict).
, checkPresentCheap = False
-- Export/import remotes can lose content stored on them in
-- many ways. This is not a problem with versioned
-- ones though, since they still allow accessing by Key.
-- And for thirdPartyPopulated, it depends on how the
-- content gets actually stored in the remote, so
-- is not overriddden here.
, untrustworthy =
if versioned || thirdPartyPopulated (remotetype r)
then untrustworthy r
else False
-- git-annex testremote cannot be used to test
-- import/export since it stores keys.
, mkUnavailable = return Nothing