forked from mirrors/jj
cli: don't show open commits in green when open commits are disabled
I had missed that `Ui::write_commit_summary()` still shows open commits in green even when open commits are disabled (as they are by default these days). This patch fixes that. The user can still override templates to format open commits differently, but I'm not sure it's worth fixing that.
This commit is contained in:
parent
f3d39c7820
commit
46578fb892
1 changed files with 5 additions and 3 deletions
|
@ -201,9 +201,11 @@ impl<'stdout> Ui<'stdout> {
|
|||
.config()
|
||||
.get_string("template.commit_summary")
|
||||
.unwrap_or_else(|_| {
|
||||
String::from(
|
||||
r#"label(if(open, "open"), commit_id.short() " " description.first_line())"#,
|
||||
)
|
||||
if self.settings.enable_open_commits() {
|
||||
String::from(r#"label(if(open, "open"), commit_id.short() " " description.first_line())"#)
|
||||
} else {
|
||||
String::from(r#"commit_id.short() " " description.first_line()"#)
|
||||
}
|
||||
});
|
||||
let template =
|
||||
crate::template_parser::parse_commit_template(repo, workspace_id, &template_string);
|
||||
|
|
Loading…
Reference in a new issue