mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-24 21:13:47 +00:00
Fix typos and slightly simplify code from #1235
This commit is contained in:
parent
daf7b656e3
commit
98261e81e2
3 changed files with 9 additions and 10 deletions
|
@ -146,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
domain information of `.email()`.
|
||||
|
||||
* It is now possible to change the author format of `jj log` with the new
|
||||
`ui.log_author_format` option.
|
||||
`ui.log-author-format` option.
|
||||
|
||||
### Fixed bugs
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ as `x days/hours/seconds ago` instead of being rendered as a full timestamp.
|
|||
### Author format
|
||||
|
||||
```toml
|
||||
ui.log_author_format = 'username'
|
||||
ui.log-author-format = 'username'
|
||||
```
|
||||
|
||||
Supported values are,
|
||||
|
|
|
@ -1436,13 +1436,12 @@ fn log_template(settings: &UserSettings) -> String {
|
|||
_ => format!("short({desired_id_len})"),
|
||||
};
|
||||
let author_template = match settings.log_author_format().as_str() {
|
||||
"none" => None,
|
||||
"full" => Some("author"),
|
||||
"name" => Some("author.name()"),
|
||||
"username" => Some("author.username()"),
|
||||
_ => Some("author.email()"),
|
||||
}
|
||||
.map_or("".to_owned(), |t| t.to_owned() + ",");
|
||||
"none" => r#""""#,
|
||||
"full" => "author",
|
||||
"name" => "author.name()",
|
||||
"username" => "author.username()",
|
||||
_ => "author.email()",
|
||||
};
|
||||
let default_template = format!(
|
||||
r#"
|
||||
label(if(current_working_copy, "working_copy"),
|
||||
|
@ -1450,7 +1449,7 @@ fn log_template(settings: &UserSettings) -> String {
|
|||
if(divergent,
|
||||
label("divergent", change_id.{prefix_format} "??"),
|
||||
change_id.{prefix_format}),
|
||||
{author_template}
|
||||
{author_template},
|
||||
{committer_timestamp},
|
||||
branches,
|
||||
tags,
|
||||
|
|
Loading…
Reference in a new issue