Skip to content

Commit

Permalink
cli: color author and commiter names yellow
Browse files Browse the repository at this point in the history
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
qubitz committed Sep 9, 2024
1 parent 12ec221 commit c657a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
(inherit from parent; default), `full` (full working copy), or `empty` (the
empty working copy).

* Color author and committer names yellow

### Fixed bugs

* Fixed panic when parsing invalid conflict markers of a particular form.
Expand Down Expand Up @@ -69,7 +71,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

* A tilde (`~`) at the start of the path will now be expanded to the user's home
directory when configuring a `signing.key` for SSH commit signing.

* When reconfiguring the author, warn that the working copy won't be updated

### Fixed bugs
Expand Down Expand Up @@ -169,7 +171,7 @@ Thanks to the people who made this release happen!

* `jj backout` can now back out multiple commits at once.

* `jj git clone some/nested/path` now creates the full directory tree for
* `jj git clone some/nested/path` now creates the full directory tree for
nested destination paths if they don't exist.

* String patterns now support case‐insensitive matching by suffixing any
Expand Down
2 changes: 2 additions & 0 deletions cli/src/config/colors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

"email" = "yellow"
"username" = "yellow"
"author" = "yellow"
"committer" = "yellow"
"timestamp" = "cyan"
"working_copies" = "green"
"branch" = "magenta"
Expand Down

0 comments on commit c657a2a

Please sign in to comment.