forked from mirrors/jj
cli: extract stock merge-tools config to file, embed it in binary
I think a separate .toml file is easier to maintain as the merge-tools table will grow.
This commit is contained in:
parent
7f9a0a2820
commit
0a28b2c508
2 changed files with 12 additions and 13 deletions
|
@ -75,19 +75,7 @@ fn env_base() -> config::Config {
|
|||
fn default_mergetool_config() -> config::Config {
|
||||
config::Config::builder()
|
||||
.add_source(config::File::from_str(
|
||||
r#"
|
||||
[merge-tools]
|
||||
meld.merge-args = ["$left", "$base", "$right",
|
||||
"-o", "$output", "--auto-merge"]
|
||||
kdiff3.merge-args = ["$base", "$left", "$right",
|
||||
"-o", "$output", "--auto"]
|
||||
vimdiff.program = "vim"
|
||||
vimdiff.merge-args = ["-f", "-d", "$output", "-M",
|
||||
"$left", "$base", "$right",
|
||||
"-c", "wincmd J", "-c", "set modifiable",
|
||||
"-c", "set write"]
|
||||
vimdiff.merge-tool-edits-conflict-markers=true
|
||||
"#,
|
||||
include_str!("merge-tools.toml"),
|
||||
config::FileFormat::Toml,
|
||||
))
|
||||
.build()
|
||||
|
|
11
src/merge-tools.toml
Normal file
11
src/merge-tools.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[merge-tools]
|
||||
meld.merge-args = ["$left", "$base", "$right",
|
||||
"-o", "$output", "--auto-merge"]
|
||||
kdiff3.merge-args = ["$base", "$left", "$right",
|
||||
"-o", "$output", "--auto"]
|
||||
vimdiff.program = "vim"
|
||||
vimdiff.merge-args = ["-f", "-d", "$output", "-M",
|
||||
"$left", "$base", "$right",
|
||||
"-c", "wincmd J", "-c", "set modifiable",
|
||||
"-c", "set write"]
|
||||
vimdiff.merge-tool-edits-conflict-markers=true
|
Loading…
Reference in a new issue