aboutsummaryrefslogtreecommitdiff
path: root/Remotes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-29 19:21:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-29 19:21:13 -0400
commit36b73714d04ad478c0f06d82cf10b24706cd8c84 (patch)
tree89d8f907bab7b9a6ff889cc6accdeb2fffd366bb /Remotes.hs
parent5b8f8ced0b6c3b22dcb5425862b9218685fbe394 (diff)
better filtering out of current repo
Diffstat (limited to 'Remotes.hs')
-rw-r--r--Remotes.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Remotes.hs b/Remotes.hs
index 053814d66..78ab010ce 100644
--- a/Remotes.hs
+++ b/Remotes.hs
@@ -88,12 +88,14 @@ keyPossibilities key = do
partition remotes = do
g <- Annex.gitRepo
u <- getUUID g
- validuuids <- liftIO $ keyLocations g key
trusted <- getTrusted
+ -- get uuids of other repositories that are
+ -- believed to have the key
+ uuids <- liftIO $ keyLocations g key
+ let validuuids = filter (/= u) uuids
-- get uuids trusted to have the key
-- note that validuuids is assumed to not have dups
- let validtrusteduuids = filter (/= u) $
- intersect validuuids trusted
+ let validtrusteduuids = intersect validuuids trusted
-- remotes that match uuids that have the key
validremotes <- reposByUUID remotes validuuids
-- partition out the trusted and untrusted remotes