mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-28 15:26:25 +00:00
config: move default merge-tool config into config/ directory
I'm about to add more default configs, so it will be good to collect them in one directory.
This commit is contained in:
parent
db0a524f7b
commit
b22a6db7e7
2 changed files with 3 additions and 3 deletions
|
@ -72,12 +72,12 @@ fn env_base() -> config::Config {
|
|||
builder.build().unwrap()
|
||||
}
|
||||
|
||||
fn default_mergetool_config() -> config::Config {
|
||||
fn default_config() -> config::Config {
|
||||
// Syntax error in default config isn't a user error. That's why defaults are
|
||||
// loaded by separate builder.
|
||||
config::Config::builder()
|
||||
.add_source(config::File::from_str(
|
||||
include_str!("merge_tool_config.toml"),
|
||||
include_str!("config/merge_tools.toml"),
|
||||
config::FileFormat::Toml,
|
||||
))
|
||||
.build()
|
||||
|
@ -113,7 +113,7 @@ fn env_overrides() -> config::Config {
|
|||
|
||||
pub fn read_config() -> Result<UserSettings, ConfigError> {
|
||||
let mut config_builder = config::Config::builder()
|
||||
.add_source(default_mergetool_config())
|
||||
.add_source(default_config())
|
||||
.add_source(env_base());
|
||||
|
||||
if let Some(config_path) = config_path()? {
|
||||
|
|
Loading…
Reference in a new issue