cli: omit log template separator if author.email() is empty

This commit is contained in:
Yuya Nishihara 2023-02-03 15:16:40 +09:00
parent eb3aeb42dc
commit fbd6657e3f
4 changed files with 15 additions and 15 deletions

View file

@ -1426,7 +1426,7 @@ fn log_template(settings: &UserSettings) -> String {
if(divergent, if(divergent,
label("divergent", change_id.{prefix_format} "??"), label("divergent", change_id.{prefix_format} "??"),
change_id.{prefix_format}) change_id.{prefix_format})
" " author.email() if(author.email(), " " author.email())
" " {committer_timestamp} " " {committer_timestamp}
if(branches, " " branches) if(branches, " " branches)
if(tags, " " tags) if(tags, " " tags)