importtree only remotes are untrusted, same as exporttree remotes
Importtree only remotes are new; importtree remotes used to always also be exporttree, so were untrusted. Since an import remote is one that can be edited by something other than git-annex, it's clearly not trustworthy at all.
This commit is contained in:
parent
e81e43b829
commit
1b5cb77acf
1 changed files with 5 additions and 4 deletions
|
@ -66,11 +66,12 @@ trustMapLoad :: Annex TrustMap
|
|||
trustMapLoad = do
|
||||
overrides <- Annex.getState Annex.forcetrust
|
||||
l <- remoteList
|
||||
-- Exports are not trusted, since they are not key/value stores.
|
||||
-- This does not apply to appendonly exports, which are key/value
|
||||
-- stores.
|
||||
-- Export/import remotes are not trusted, since they are not
|
||||
-- key/value stores. (Unless they are appendonly remotes.)
|
||||
let isexportimport r = Types.Remote.isExportSupported r
|
||||
<||> Types.Remote.isImportSupported r
|
||||
let untrustworthy r = pure (not (Types.Remote.appendonly r))
|
||||
<&&> Types.Remote.isExportSupported r
|
||||
<&&> isexportimport r
|
||||
exports <- filterM untrustworthy l
|
||||
let exportoverrides = M.fromList $
|
||||
map (\r -> (Types.Remote.uuid r, UnTrusted)) exports
|
||||
|
|
Loading…
Reference in a new issue