matching preferred content before key is known

This will let import try to match preferred content expressions before
downloading the content and generating its key.

If an expression needs a key, it preferredContentParser with
preferredContentKeylessTokens will fail to parse it.

standard and groupwanted are not in preferredContentKeylessTokens
because they may refer to an expression that refers to a key.
That needs further work to support them.
This commit is contained in:
Joey Hess 2019-05-14 14:01:09 -04:00
parent aa7710982b
commit 9411a7c93c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 97 additions and 43 deletions

View file

@ -23,6 +23,7 @@ import qualified Git.LsTree as LsTree
import Git.Types
import Git.FilePath
import qualified Annex.Branch
import Annex.FileMatcher
import qualified Data.Set as S
@ -73,7 +74,7 @@ configFilesActions =
reloadConfigs :: Configs -> Assistant ()
reloadConfigs changedconfigs = do
sequence_ as
void $ liftAnnex preferredRequiredMapsLoad
void $ liftAnnex $ preferredRequiredMapsLoad preferredContentTokens
{- Changes to the remote log, or the trust log, can affect the
- syncRemotes list. Changes to the uuid log may affect its
- display so are also included. -}