avoid syncing remotes configured annex-ignore, unless explicitly specified

This commit is contained in:
Joey Hess 2011-12-31 01:42:42 -04:00
parent e7d3e546c2
commit 015a497914
2 changed files with 8 additions and 3 deletions

View file

@ -17,6 +17,7 @@ module Remote (
remoteTypes,
remoteList,
enabledRemoteList,
remoteMap,
byName,
prettyPrintUUIDs,
@ -85,6 +86,10 @@ remoteList = do
u <- getRepoUUID r
generate t r u (M.lookup u m)
{- All remotes that are not ignored. -}
enabledRemoteList :: Annex [Remote Annex]
enabledRemoteList = filterM (repoNotIgnored . repo) =<< remoteList
{- Map of UUIDs of Remotes and their names. -}
remoteMap :: Annex (M.Map UUID String)
remoteMap = M.fromList . map (\r -> (uuid r, name r)) <$> remoteList
@ -196,7 +201,7 @@ keyPossibilities' withtrusted key = do
let validtrusteduuids = validuuids `intersect` trusted
-- remotes that match uuids that have the key
allremotes <- filterM (repoNotIgnored . repo) =<< remoteList
allremotes <- enabledRemoteList
let validremotes = remotesWithUUID allremotes validuuids
return (sort validremotes, validtrusteduuids)