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: Improve jj backout generated description #2669

Open
ocharles opened this issue Dec 5, 2023 · 2 comments · May be fixed by #3583
Open

FR: Improve jj backout generated description #2669

ocharles opened this issue Dec 5, 2023 · 2 comments · May be fixed by #3583
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@ocharles
Copy link

ocharles commented Dec 5, 2023

Is your feature request related to a problem? Please describe.
Currently when a commit is created with jj backout, the description just mentions the commit hash. This makes a very poor commit message

Describe the solution you'd like
I would just copy what git revert does and use "Revert '$first_line_of_commit_being_reverted'"

Describe alternatives you've considered
I haven't considered any alternatives.

Additional context

@thoughtpolice
Copy link
Collaborator

thoughtpolice commented Dec 5, 2023

Would it be acceptable to put the first line in the body of the message, rather than in the title? Or do you want it in the title? I ask because putting the hash in the title is kind of nice since it's often hyperlinkable on places like GitHub, so you can click to see exactly what it's reverting anyway. For jj log itself, it will also allow you to see the commit from the default short, one-line format, rather than needing to expand the message e.g. with jj show to find the commit it's backing out.

I find the last bit the most important and subtle part; due to the fact the jj log is truncated by default, to only show as short a history as possible, I actually find the commit hash is more useful since you can just immediately jj show that hash, but you can't necessarily look up reverted commit from the description without something like jj log -r description(exact:"...") or whatnot.

That said I agree just having a fully empty message is otherwise not great!

@ocharles
Copy link
Author

ocharles commented Dec 6, 2023

I think I do really want line one of the commit to be line one of the back out because:

  1. It prepopulates the title of GitHub pull requests. At work, we use a squash-merge only PR system, so optimizing for that is best (for me).
  2. It's much rarer that I actually need to see the commit that was reverted. I just need to understand the general commit that was reverted.

Perhaps this means it's ⭐ template time ⭐ ?

@PhilipMetzger PhilipMetzger added the polish🪒🐃 Make existing features more convenient and more consistent label Jan 9, 2024
@bnjmnt4n bnjmnt4n linked a pull request Apr 26, 2024 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

3 participants