fix(config): by default, render git refs as green instead of magenta

Summary: Someone on Discord mentioned that while using branches, they could
switch between branches like `m1` and `main`, but not `HEAD@git`, even though it
was color coded the same and located right next to the other branch names in the
default `jj log` output.

This confused me too at first, until I realized `jj` was telling me that the
given commit was the `HEAD` reference in the colocated git repo. Let's just
color these references differently in the default schema, to try and hint that
these aren't the same. `bright green` is arbitrary, but helps stand out; and
`green` was only picked because both it and `git` start with "g".

GitHub Issue: #1843

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I66d53ea2b9155db1fec6cae8ba8cbd0f
This commit is contained in:
Austin Seipp 2023-07-10 16:05:56 -05:00
parent 7acdc8f011
commit 5c82100ef0
2 changed files with 4 additions and 4 deletions

View file

@ -26,8 +26,8 @@
"branch" = "magenta"
"branches" = "magenta"
"tags" = "magenta"
"git_refs" = "magenta"
"git_head" = "magenta"
"git_refs" = "bright green"
"git_head" = "bright green"
"divergent" = "red"
"divergent change_id"="red"
"conflict" = "red"
@ -44,7 +44,7 @@
"working_copy branch" = "bright magenta"
"working_copy branches" = "bright magenta"
"working_copy tags" = "bright magenta"
"working_copy git_refs" = "bright magenta"
"working_copy git_refs" = "bright green"
"working_copy divergent" = "bright red"
"working_copy divergent change_id" = "bright red"
"working_copy conflict" = "bright red"

View file

@ -281,7 +281,7 @@ fn test_log_git_head() {
insta::assert_snapshot!(stdout, @r###"
@ rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 50aaf4754c1e
initial
qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 master HEAD@git 230dd059e1b0
qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 master HEAD@git 230dd059e1b0
(empty) (no description set)
zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000
(empty) (no description set)