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

FR: Prefix empty lines with JJ: in generated draft commit description #5484

Open
schweikert opened this issue Jan 27, 2025 · 1 comment
Open
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@schweikert
Copy link

Is your feature request related to a problem? Please describe.
When editing commit descriptions, particularly when editing multiple commits at once, I find it visually difficult to recognize JJ-ignored blocks from actual content that I should fill in. Here is an example:

JJ: Enter or edit commit descriptions after the `JJ: describe` lines.
JJ: Warning:
JJ: - The text you enter will be lost on a syntax error.
JJ: - The syntax of the separator lines may change in the future.

JJ: describe 52fd2a531ca1 -------
Release v5.3

Prepare the release for 5.3.

JJ: This commit contains the following changes:
JJ:     M CHANGELOG.md
JJ:     M configure.ac

JJ: describe 6d2f3c530bb7 -------

JJ: Lines starting with "JJ: " (like this one) will be removed.

Describe the solution you'd like
It would be great, if the generated draft didn't add newlines without the JJ prefix. Maybe this could be an option, or maybe the templating language could be extended to make this possible:

JJ: Enter or edit commit descriptions after the `JJ: describe` lines.
JJ: Warning:
JJ: - The text you enter will be lost on a syntax error.
JJ: - The syntax of the separator lines may change in the future.
JJ:
JJ: describe 52fd2a531ca1 -------
Release v5.3

Prepare the release for 5.3.

JJ: This commit contains the following changes:
JJ:     M CHANGELOG.md
JJ:     M configure.ac
JJ:
JJ: describe 6d2f3c530bb7 -------

I also removed the JJ: Lines starting with "JJ: " line to remove some more "noise".

This looks probably a bit like bike shedding, but to me, this would make a significant difference.

Describe alternatives you've considered
I tried modifying draft_commit_description, but this doesn't seem possible. jj adds these empty lines outside of it

Additional context

@PhilipMetzger PhilipMetzger added the polish🪒🐃 Make existing features more convenient and more consistent label Jan 27, 2025
@PhilipMetzger
Copy link
Contributor

We recently had a discussion on Discord about this, although in relation to jj split and the consensus was to either make it configurable or a template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polish🪒🐃 Make existing features more convenient and more consistent
Projects
None yet
Development

No branches or pull requests

2 participants