From 5b8f8ced0b6c3b22dcb5425862b9218685fbe394 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 29 Dec 2010 19:09:02 -0400 Subject: [PATCH] don't include the current repo in trusted uuid list --- Remotes.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Remotes.hs b/Remotes.hs index 99c0930adf..053814d66d 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