forked from mirrors/jj
config: add color for renamed and copied in summary
Right now, renamed and copied files don't have any color in the output of `jj status`, and it makes them stand out. I think it's reasonable to color renamed files the same as modified files, since renaming is like modifying the path, and to color copied files the same as added files, since they're basically just added files that happen to have similar contents to an existing file.
This commit is contained in:
parent
1c672d7563
commit
52499e84cc
2 changed files with 4 additions and 2 deletions
|
@ -82,6 +82,8 @@
|
|||
"diff added" = { fg = "green" }
|
||||
"diff token" = { underline = true }
|
||||
"diff modified" = "cyan"
|
||||
"diff renamed" = "cyan"
|
||||
"diff copied" = "green"
|
||||
"diff access-denied" = { bg = "red" }
|
||||
|
||||
"op_log id" = "blue"
|
||||
|
|
|
@ -1017,7 +1017,7 @@ fn test_log_diff_predefined_formats() {
|
|||
=== summary ===
|
||||
[38;5;6mM file1[39m
|
||||
[38;5;6mM file2[39m
|
||||
R {rename-source => rename-target}
|
||||
[38;5;6mR {rename-source => rename-target}[39m
|
||||
"###);
|
||||
|
||||
// color labels
|
||||
|
@ -1063,7 +1063,7 @@ fn test_log_diff_predefined_formats() {
|
|||
<<log::=== summary ===>>
|
||||
[38;5;6m<<log diff summary modified::M file1>>[39m
|
||||
[38;5;6m<<log diff summary modified::M file2>>[39m
|
||||
<<log diff summary renamed::R {rename-source => rename-target}>>
|
||||
[38;5;6m<<log diff summary renamed::R {rename-source => rename-target}>>[39m
|
||||
"###);
|
||||
|
||||
// cwd != workspace root
|
||||
|
|
Loading…
Reference in a new issue