summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-29 19:09:02 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-29 19:13:42 -0400
commit5b8f8ced0b6c3b22dcb5425862b9218685fbe394 (patch)
treeaf16b517f83747126c55a490bb474898eb74c4b7
parentde2f6137d3f38f822b0bfbf534e8f785459ea3cf (diff)
don't include the current repo in trusted uuid list
-rw-r--r--Remotes.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Remotes.hs b/Remotes.hs
index 99c0930ad..053814d66 100644
--- a/Remotes.hs
+++ b/Remotes.hs
@@ -49,7 +49,7 @@ list remotes = join ", " $ map Git.repoDescribe remotes
-
- The second is of untrusted remotes that may have the key.
-
- - Also returns a list of all UUIDs that are trusted to have the key
+ - Also returns a list of UUIDs that are trusted to have the key
- (some may not have configured remotes).
-}
keyPossibilities :: Key -> Annex ([Git.Repo], [Git.Repo], [UUID])
@@ -87,11 +87,13 @@ keyPossibilities key = do
return $ null u
partition remotes = do
g <- Annex.gitRepo
+ u <- getUUID g
validuuids <- liftIO $ keyLocations g key
trusted <- getTrusted
-- get uuids trusted to have the key
-- note that validuuids is assumed to not have dups
- let validtrusteduuids = intersect validuuids trusted
+ let validtrusteduuids = filter (/= u) $
+ intersect validuuids trusted
-- remotes that match uuids that have the key
validremotes <- reposByUUID remotes validuuids
-- partition out the trusted and untrusted remotes