Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color signature names yellow within the log #4335

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

qubitz
Copy link
Collaborator

@qubitz qubitz commented Aug 24, 2024

Included the details in the commit message. There is probably a better way to do this, but I've been running with these changes in my local config.toml and seem to be working well with no other color conflicts. Suggestions welcome.

Checklist

If applicable:

  • I have updated CHANGELOG.md

Copy link

google-cla bot commented Aug 24, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

cli/src/config/colors.toml Outdated Show resolved Hide resolved
@qubitz qubitz force-pushed the make-names-yellow branch 2 times, most recently from 374e497 to c657a2a Compare September 9, 2024 18:36
@qubitz
Copy link
Collaborator Author

qubitz commented Sep 9, 2024

Good call @yuja with the suggestion. Looks more consistent:

jj show
image

jj log
image

PR is ready for merging. Let me know what I can do to get the CI passing.

Copy link
Collaborator

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

You'll need to update test snapshots by cargo insta test && cargo insta review.
https://martinvonz.github.io/jj/latest/contributing/#summary

cli/src/config/colors.toml Show resolved Hide resolved
@qubitz qubitz force-pushed the make-names-yellow branch 3 times, most recently from 69bf38f to a5ecdfa Compare September 21, 2024 03:24
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'.
@qubitz qubitz merged commit 9f8d936 into jj-vcs:main Sep 29, 2024
18 checks passed
@qubitz qubitz deleted the make-names-yellow branch September 29, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants