-
Notifications
You must be signed in to change notification settings - Fork 596
annotate: make AnnotationLine template type #5629
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
annotate: make AnnotationLine template type #5629
Conversation
b3a2132
to
23e1b75
Compare
@yuja, it looks like this is ready for another review whenever you have time. All the discussions are marked resolved but there were no text responses to any of them, so you might not have noticed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
(Please also feel free to ping me if you get no response in a couple of days.)
Allows: * self.commit() * self.line_number() * self.first_line_in_hunk() Certain pagers (like `delta`), when used for `git blame`, only show the commit information for the first line in a hunk. This would be a nice addition to `jj file annotate`. `jj file annotate` already uses a template to control the rendering of commit information --- `templates.annotate_commit_summary`. Instead of a custom CLI flag, the tools necessary to do this should be available in the template language. If `1 % 2` or `1.is_even()` was available in the template language, this would also allow alternating colors (using `raw_escape_sequence`). Example: ```toml [templates] # only show commit info for the first line of each hunk annotate_commit_summary = ''' if(first_line_in_hunk, show_commit_info(commit), pad_end(20, " "), ) ''' ```
23e1b75
to
8fd2dcd
Compare
Discord discussion: https://discord.com/channels/968932220549103686/1337969561793990757
Allows:
Certain pagers (like
delta
), when used forgit blame
, only show thecommit information for the first line in a hunk. This would be a nice
addition to
jj file annotate
.jj file annotate
already uses a template to control the rendering ofcommit information ---
templates.annotate_commit_summary
. Instead ofa custom CLI flag, the tools necessary to do this should be available in
the template language.
If
1 % 2
or1.is_even()
was available in the template language, thiswould also allow alternating colors (using
raw_escape_sequence
).Example:
Checklist
If applicable:
CHANGELOG.md