forked from mirrors/jj
cli: leverage separate() function to concatenate log template fields
This commit is contained in:
parent
fbd6657e3f
commit
1972eccad1
1 changed files with 13 additions and 11 deletions
|
@ -1423,17 +1423,19 @@ fn log_template(settings: &UserSettings) -> String {
|
||||||
let default_template = format!(
|
let default_template = format!(
|
||||||
r#"
|
r#"
|
||||||
label(if(current_working_copy, "working_copy"),
|
label(if(current_working_copy, "working_copy"),
|
||||||
if(divergent,
|
separate(" ",
|
||||||
label("divergent", change_id.{prefix_format} "??"),
|
if(divergent,
|
||||||
change_id.{prefix_format})
|
label("divergent", change_id.{prefix_format} "??"),
|
||||||
if(author.email(), " " author.email())
|
change_id.{prefix_format}),
|
||||||
" " {committer_timestamp}
|
author.email(),
|
||||||
if(branches, " " branches)
|
{committer_timestamp},
|
||||||
if(tags, " " tags)
|
branches,
|
||||||
if(working_copies, " " working_copies)
|
tags,
|
||||||
if(git_head, " " git_head)
|
working_copies,
|
||||||
" " commit_id.{prefix_format}
|
git_head,
|
||||||
if(conflict, " " label("conflict", "conflict"))
|
commit_id.{prefix_format},
|
||||||
|
if(conflict, label("conflict", "conflict"))
|
||||||
|
)
|
||||||
"\n"
|
"\n"
|
||||||
if(empty, label("empty", "(empty)") " ")
|
if(empty, label("empty", "(empty)") " ")
|
||||||
if(description, description.first_line(), {DESCRIPTION_PLACEHOLDER_TEMPLATE})
|
if(description, description.first_line(), {DESCRIPTION_PLACEHOLDER_TEMPLATE})
|
||||||
|
|
Loading…
Reference in a new issue