ok/jj
1
0
Fork 0
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:
Scott Taylor 2024-09-03 17:35:03 -05:00 committed by Scott Taylor
parent 1c672d7563
commit 52499e84cc
2 changed files with 4 additions and 2 deletions

View file

@ -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"

View file

@ -1017,7 +1017,7 @@ fn test_log_diff_predefined_formats() {
=== summary ===
M file1
M file2
R {rename-source => rename-target}
R {rename-source => rename-target}
"###);
// color labels
@ -1063,7 +1063,7 @@ fn test_log_diff_predefined_formats() {
<<log::=== summary ===>>
<<log diff summary modified::M file1>>
<<log diff summary modified::M file2>>
<<log diff summary renamed::R {rename-source => rename-target}>>
<<log diff summary renamed::R {rename-source => rename-target}>>
"###);
// cwd != workspace root