nub the equivilant key list

If somehow the same key gets listed in the log twice, avoid doing double
checksumming.
This commit is contained in:
Joey Hess 2024-03-01 14:39:01 -04:00
parent 0ac8962b1b
commit 310a49a76d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -21,7 +21,7 @@ import qualified Annex.Branch
getEquivilantKeys :: Key -> Annex [Key]
getEquivilantKeys key = do
config <- Annex.getGitConfig
mapMaybe (deserializeKey' . fromLogInfo)
nub . mapMaybe (deserializeKey' . fromLogInfo)
<$> presentLogInfo (equivilantKeysLogFile config key)
setEquivilantKey :: Key -> Key -> Annex ()