support required groupwanted

When the required content is set to "groupwanted", use whatever expression
has been set in groupwanted as the required content of the repo, similar to
how setting required content to "standard" already worked.
This commit is contained in:
Joey Hess 2020-04-28 13:31:26 -04:00
parent 45d884db9b
commit 57b89c635f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 33 additions and 2 deletions

View file

@ -92,8 +92,9 @@ preferredRequiredMapsLoad' mktokens = do
in simpleMap
. parseLogOldWithUUID (\u -> mk u . decodeBS <$> A.takeByteString)
<$> Annex.Branch.get l
pc <- genmap preferredContentLog =<< groupPreferredContentMapRaw
rc <- genmap requiredContentLog M.empty
gm <- groupPreferredContentMapRaw
pc <- genmap preferredContentLog gm
rc <- genmap requiredContentLog gm
-- Required content is implicitly also preferred content, so combine.
let pc' = M.unionWith combiner pc rc
return (pc', rc)