-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: color author and commiter names yellow
When `format_short_signature(signature)` is set to `signature.name()` the author names are not yellow like other signature types (eg email and username). When the commit signatures have no colors, they blend in making it hard to distinguish between signatures and commit messages. If just `name` were set to `yellow`, just like email and username, it affects the colorization of branch names making them also yellow despite them being designated as magenta. Setting `author` and `committer` to `yellow` is specific enough to allow branches to keep their colors while still coloring signature names. This is known to affect signatures in both 'log' and 'show'.
- Loading branch information
Showing
5 changed files
with
21 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -346,8 +346,8 @@ fn test_log_builtin_templates_colored() { | |
│ | ||
○ Commit ID: [38;5;4m230dd059e1b059aefc0da06a2e5a7dbf22362f22[39m | ||
│ Change ID: [38;5;5mqpvuntsmwlqtpsluzzsnyyzlmlwvmlnu[39m | ||
│ Author: Test User <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ Committer: Test User <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ Author: [38;5;3mTest User[39m <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ Committer: [38;5;3mTest User[39m <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ | ||
│ [38;5;2m (no description set)[39m | ||
│ | ||
|
@@ -415,8 +415,8 @@ fn test_log_builtin_templates_colored_debug() { | |
│ <<log::>> | ||
<<node::○>> <<log::Commit ID: >>[38;5;4m<<log commit_id::230dd059e1b059aefc0da06a2e5a7dbf22362f22>>[39m<<log::>> | ||
│ <<log::Change ID: >>[38;5;5m<<log change_id::qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu>>[39m<<log::>> | ||
│ <<log::Author: >><<log author name::Test User>><<log:: <>>[38;5;3m<<log author email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::Committer: >><<log committer name::Test User>><<log:: <>>[38;5;3m<<log committer email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::Author: >>[38;5;3m<<log author name::Test User>>[39m<<log:: <>>[38;5;3m<<log author email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::Committer: >>[38;5;3m<<log committer name::Test User>>[39m<<log:: <>>[38;5;3m<<log committer email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::>> | ||
│ [38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>> | ||
│ <<log::>> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,11 +80,11 @@ fn test_show_basic() { | |
"###); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--color=debug"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: [38;5;4m<<commit_id::e34f04317a81edc6ba41fef239c0d0180f10656f>>[39m | ||
Change ID: [38;5;5m<<change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m | ||
Author: <<author name::Test User>> <[38;5;3m<<author email::[email protected]>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Committer: <<committer name::Test User>> <[38;5;3m<<committer email::[email protected]>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Author: [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::[email protected]>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Committer: [38;5;3m<<committer name::Test User>>[39m <[38;5;3m<<committer email::[email protected]>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m) | ||
[38;5;3m<<description placeholder:: (no description set)>>[39m | ||
|
@@ -93,7 +93,7 @@ fn test_show_basic() { | |
<<diff:: >>[38;5;2m<<diff added line_number:: 2>>[39m<<diff::: >>[4m[38;5;2m<<diff added token::bar>>[24m[39m | ||
[38;5;1m<<diff removed line_number:: 2>>[39m<<diff:: >>[38;5;2m<<diff added line_number:: 3>>[39m<<diff::: baz >>[4m[38;5;1m<<diff removed token::qux>>[38;5;2m<<diff added token::quux>>[24m[39m<<diff::>> | ||
[38;5;3m<<diff header::Modified regular file file3 (file1 => file3):>>[39m | ||
"###); | ||
"#); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
|
@@ -167,11 +167,11 @@ fn test_show_basic() { | |
"###); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git", "--color=debug"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: [38;5;4m<<commit_id::e34f04317a81edc6ba41fef239c0d0180f10656f>>[39m | ||
Change ID: [38;5;5m<<change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m | ||
Author: <<author name::Test User>> <[38;5;3m<<author email::[email protected]>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Committer: <<committer name::Test User>> <[38;5;3m<<committer email::[email protected]>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Author: [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::[email protected]>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m) | ||
Committer: [38;5;3m<<committer name::Test User>>[39m <[38;5;3m<<committer email::[email protected]>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m) | ||
[38;5;3m<<description placeholder:: (no description set)>>[39m | ||
|
@@ -187,7 +187,7 @@ fn test_show_basic() { | |
[1m<<diff file_header::diff --git a/file1 b/file3>>[0m | ||
[1m<<diff file_header::rename from file1>>[0m | ||
[1m<<diff file_header::rename to file3>>[0m | ||
"###); | ||
"#); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s", "--git"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
|