mirror of
https://github.com/martinvonz/jj.git
synced 2024-10-25 07:56:16 +00:00
cli: simplify match arms in diff_format_for()
This commit is contained in:
parent
5e490f310f
commit
dff53b1200
1 changed files with 4 additions and 4 deletions
|
@ -60,10 +60,10 @@ pub fn diff_format_for(ui: &Ui, args: &DiffFormatArgs) -> DiffFormat {
|
||||||
} else if args.color_words {
|
} else if args.color_words {
|
||||||
DiffFormat::ColorWords
|
DiffFormat::ColorWords
|
||||||
} else {
|
} else {
|
||||||
match ui.settings().config().get_string("diff.format") {
|
match ui.settings().config().get_string("diff.format").as_deref() {
|
||||||
Ok(value) if &value == "summary" => DiffFormat::Summary,
|
Ok("summary") => DiffFormat::Summary,
|
||||||
Ok(value) if &value == "git" => DiffFormat::Git,
|
Ok("git") => DiffFormat::Git,
|
||||||
Ok(value) if &value == "color-words" => DiffFormat::ColorWords,
|
Ok("color-words") => DiffFormat::ColorWords,
|
||||||
_ => DiffFormat::ColorWords,
|
_ => DiffFormat::ColorWords,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue