wip separate RemoteConfig parsing
authorJoey Hess <joeyh@joeyh.name>
Mon, 13 Jan 2020 16:35:39 +0000 (12:35 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 13 Jan 2020 16:39:21 +0000 (12:39 -0400)
commit71f78fe45dc91dbef0bedd79b33d6a9fed85704d
tree55b6cd8217cd1d0c72bcce5a30dbf8547984b20a
parent4a135934ffe8eaf96ff6bb65ff3e22f2d54d9448
wip separate RemoteConfig parsing

Remote now contains a ParsedRemoteConfig. The parsing happens when the
Remote is constructed, rather than when individual configs are used.

This is more efficient, and it lets initremote/enableremote
reject configs that have unknown fields or unparsable values.

It also allows for improved type safety, as shown in
Remote.Helper.Encryptable where things that used to match on string
configs now match on data types.

This is a work in progress, it does not build yet.

The main risk in this conversion is forgetting to add a field to
RemoteConfigParser. That will prevent using that field with
initremote/enableremote, and will prevent remotes that already are set
up from seeing that configuration. So will need to check carefully that
every field that getRemoteConfigValue is called on has been added to
RemoteConfigParser.

(One such case I need to remember is that credPairRemoteField needs to be
included in the RemoteConfigParser.)
Annex/SpecialRemote/Config.hs
Config/RemoteConfig.hs [new file with mode: 0644]
Creds.hs
Crypto.hs
Remote/Helper/Chunked.hs
Remote/Helper/Encryptable.hs
Remote/Helper/Special.hs
Types/Remote.hs
Types/RemoteConfig.hs [new file with mode: 0644]
git-annex.cabal