don't include the current repo in trusted uuid list
This commit is contained in:
parent
de2f6137d3
commit
5b8f8ced0b
1 changed files with 4 additions and 2 deletions
|
@ -49,7 +49,7 @@ list remotes = join ", " $ map Git.repoDescribe remotes
|
||||||
-
|
-
|
||||||
- The second is of untrusted remotes that may have the key.
|
- 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).
|
- (some may not have configured remotes).
|
||||||
-}
|
-}
|
||||||
keyPossibilities :: Key -> Annex ([Git.Repo], [Git.Repo], [UUID])
|
keyPossibilities :: Key -> Annex ([Git.Repo], [Git.Repo], [UUID])
|
||||||
|
@ -87,11 +87,13 @@ keyPossibilities key = do
|
||||||
return $ null u
|
return $ null u
|
||||||
partition remotes = do
|
partition remotes = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
|
u <- getUUID g
|
||||||
validuuids <- liftIO $ keyLocations g key
|
validuuids <- liftIO $ keyLocations g key
|
||||||
trusted <- getTrusted
|
trusted <- getTrusted
|
||||||
-- get uuids trusted to have the key
|
-- get uuids trusted to have the key
|
||||||
-- note that validuuids is assumed to not have dups
|
-- 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
|
-- remotes that match uuids that have the key
|
||||||
validremotes <- reposByUUID remotes validuuids
|
validremotes <- reposByUUID remotes validuuids
|
||||||
-- partition out the trusted and untrusted remotes
|
-- partition out the trusted and untrusted remotes
|
||||||
|
|
Loading…
Reference in a new issue