-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: extract layer management from cli LayeredConfigs to jj-lib
Layers are now constructed per file, not per source type. This will allow us to report precise position where bad configuration variable is set. Because layers are now created per file, it makes sense to require existence of the file, instead of ignoring missing files which would leave an empty layer in the stack. The path existence is tested by ConfigEnv::existing_config_path(), so I simply made the new load_file/dir() methods stricter. However, we still need config::File::required(false) flag in order to accept /dev/null as an empty TOML file. The lib type is renamed to StackedConfig to avoid name conflicts. The cli LayeredConfigs will probably be reorganized as an environment object that builds a StackedConfig.
- Loading branch information
Showing
3 changed files
with
272 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.