jj
jj copied to clipboard
cli: use a different symbol for immutable nodes in log
This is a part of #3111. I've introduced a different symbol for immutable nodes. I'm not planning doing configurable node symbols in this PR (mentioned in the issue). And I'm not sure about coloring the commit id differently. I'm open to color suggestions :)
I didn't update tests because there are a lot of them failed and also to avoid opening a massive PR as a draft. I'll update them when the main part of the PR is resolved.
Here are some screenshots with different symbols I've tried:
◈ diamond inside (PR) |
✦ four pointed star |
|---|---|
◆ diamond |
· middle dot |
|---|---|
Using
jj log -r ..on the repo withrevset-aliases.immutable_heads()="main@upstream | gh-pages@upstream"in the config.
While diamond symbols look great, with my vision I'd prefer ✦ or · because they are more distinct than the default node symbol.
Checklist
If applicable:
- [ ] I have updated
CHANGELOG.md - [ ] I have updated the documentation (README.md, docs/, demos/)
- [ ] I have updated the config schema (cli/src/config-schema.json)
- [ ] I have added tests to cover my changes
Nice! FWIW, I much prefer BLACK FOUR POINTED STAR and DIAMOND over the other two; I think that MIDDLE DOT may not be good because the ASCII alternative, period, is already used period elsewhere in the DAG renderer, I think.
I would maybe also like to see some coloring on the node itself, but it may not be currently possible. It also may look bad. Either way I'm glad to see someone do this!
I think the DIAMOND has the most contrast to the other symbols, and looks solid (immutable).
I like 'diamond inside', it's stylistically similar to the circle of other commits yet different, and still carries some of the diamonds meaning of being solid/immutable (also gotta change the homework from git-branchless I guess haha).
Again (I will keep reminding about that xd) ideally we'd have it be configurable and discuss the default config, not the hardcoded symbols :)
Again (I will keep reminding about that xd) ideally we'd have it be configurable and discuss the default config, not the hardcoded symbols :)
@necauqua I'm not particularly against configurable symbols, just don't want to do it here and so far I'm happy with the current choice :)
My preferred symbol for immutable commits would be the diamond git-branchless uses. But landing any variant works for now.
I'm closing this. There is a greater interest in using templating to customize the graph symbols (#3260). Additionally, I believe that in the long term, it would be more preferable. Thank you all for all your feedback!