be stricter about rejecting invalid configurations for remotes
authorJoey Hess <joeyh@joeyh.name>
Fri, 10 Jan 2020 18:10:20 +0000 (14:10 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 10 Jan 2020 18:52:48 +0000 (14:52 -0400)
commit71ecfbfccf1f1d1dd3d83d79f80b694398e1092b
tree02dc973fcf4bf989138cea1bd70569c7e1431343
parentea3f206fd110e4063e8f1cbe3b330085ab631ce2
be stricter about rejecting invalid configurations for remotes

This is a first step toward that goal, using the ProposedAccepted type
in RemoteConfig lets initremote/enableremote reject bad parameters that
were passed in a remote's configuration, while avoiding enableremote
rejecting bad parameters that have already been stored in remote.log

This does not eliminate every place where a remote config is parsed and a
default value is used if the parse false. But, I did fix several
things that expected foo=yes/no and so confusingly accepted foo=true but
treated it like foo=no. There are still some fields that are parsed with
yesNo but not not checked when initializing a remote, and there are other
fields that are parsed in other ways and not checked when initializing a
remote.

This also lays groundwork for rejecting unknown/typoed config keys.
45 files changed:
Annex/Branch/Transitions.hs
Annex/FileMatcher.hs
Annex/SpecialRemote.hs
Annex/SpecialRemote/Config.hs
Assistant/Gpg.hs
Assistant/MakeRemote.hs
Assistant/WebApp/Configurators/AWS.hs
Assistant/WebApp/Configurators/Edit.hs
Assistant/WebApp/Configurators/IA.hs
Assistant/WebApp/Configurators/Local.hs
Assistant/WebApp/Configurators/Ssh.hs
Assistant/WebApp/Configurators/WebDAV.hs
Assistant/WebApp/RepoList.hs
CHANGELOG
Command/EnableRemote.hs
Command/InitRemote.hs
Command/RenameRemote.hs
Command/TestRemote.hs
Config.hs
Creds.hs
Crypto.hs
Logs/Remote/Pure.hs
Remote/Adb.hs
Remote/Bup.hs
Remote/Ddar.hs
Remote/Directory.hs
Remote/External.hs
Remote/GCrypt.hs
Remote/Git.hs
Remote/GitLFS.hs
Remote/Glacier.hs
Remote/Helper/AWS.hs
Remote/Helper/Chunked.hs
Remote/Helper/Encryptable.hs
Remote/Helper/ExportImport.hs
Remote/Hook.hs
Remote/Rsync.hs
Remote/S3.hs
Remote/Tahoe.hs
Remote/WebDAV.hs
Types/ProposedAccepted.hs [new file with mode: 0644]
Types/Remote.hs
Types/StandardGroups.hs
doc/todo/assure_correct_names___40__and_values__41___for_special_remotes_parameters/comment_2_afa8c10bd3b1df649c1f643430b300e9._comment
git-annex.cabal