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: Describe both sides of jj split in one editor #5432

Open
bryceberger opened this issue Jan 22, 2025 · 2 comments
Open

FR: Describe both sides of jj split in one editor #5432

bryceberger opened this issue Jan 22, 2025 · 2 comments
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@bryceberger
Copy link
Member

Is your feature request related to a problem? Please describe.
jj split opens an editor up to twice: for the first commit, and optionally for the second commit (if the original commit's description was not empty). Since #3828, it's been possible to describe multiple commits in the same editor.

Describe the solution you'd like
jj split should (configurable?) open an editor with contents like:

JJ: describe aaaaaa -----
JJ: describe the first commit
{templates.draft_commit_description}

JJ: describe bbbbbb -----
JJ: describe the second commit
{templates.draft_commit_description}

Describe alternatives you've considered
This could be configurable. The current behavior of one commit = one $EDITOR could be useful for workflows that override $EDITOR to do configuration more advanced than available in templates.

Additional context
This comes from a discord discussion where the user's normal split workflow involved only setting a message for the first commit. In that case, having any comment is an annoyance, since only the first commit message should be modified. However, that workflow is equivalent to jj commit. I am of the opinion that jj commit [-i] should be preferred in this case, and jj split should always show JJ: describe lines for both commits.

@bryceberger bryceberger changed the title FR: Describe both sides of jj split FR: Describe both sides of jj split in one editor Jan 22, 2025
@martinvonz
Copy link
Member

If we add support for multi-way splitting #5312, I wonder if it may be hard to remember what each commit was about when you're done splitting. Just a thought, maybe it's not a problem. I suppose users who do a lot of multi-way splitting can decide to include the diff in the description template.

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

yuja commented Jan 23, 2025

#3060 is also related. To me, it would be nice if jj split doesn't open editor at all.

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

4 participants