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: Ability to customize message generated by jj backout #5676

Closed
zx8 opened this issue Feb 13, 2025 · 7 comments · Fixed by #5684
Closed

FR: Ability to customize message generated by jj backout #5676

zx8 opened this issue Feb 13, 2025 · 7 comments · Fixed by #5684
Labels
enhancement New feature or request

Comments

@zx8
Copy link

zx8 commented Feb 13, 2025

Personally, I prefer to use "revert" in my commit messages as I'm used to it from git, and my colleagues (non-jj users) have become used to scanning for the word "Revert XYZ" in git's log output.

Is it possible to make this configurable? i.e. so a jj backout commit is indistinguishable from a git revert, without having to manually rewrite the commit message/description each time.

@yuja
Copy link
Contributor

yuja commented Feb 13, 2025

We'll need per-command description template similar to templates.draft_commit_description and ui.default-description.

@yuja yuja added the enhancement New feature or request label Feb 13, 2025
@bnjmnt4n
Copy link
Member

bnjmnt4n commented Feb 13, 2025

I had #3583 before, which did something similar (but added a --template argument as well). Maybe I should reopen it?

@yuja
Copy link
Contributor

yuja commented Feb 13, 2025

I personally don't think we'll need backout --template (or backout --message-template=<TEMPLATE>) option, but some configured description template will be useful. I think ui.default-description can be replaced with that.

@emilazy
Copy link
Contributor

emilazy commented Feb 13, 2025

Does anyone strongly prefer "back out"? Our current template is identical to Git's except that Git says "revert". I find "back out" somewhat awkward and not more accurate, so I would prefer we adjust the default template and rename the command.

@zx8

This comment has been minimized.

@emilazy
Copy link
Contributor

emilazy commented Feb 13, 2025

@martinvonz said in #5397 (comment):

revert is confusing for hg users (hg revert is jj restore). We could still use that, or we could use reverse. Another option is rollback (or roll-back to be more grammatically correct).

Personally I think a little confusion for Mercurial users an acceptable cost for what I think is the better name (we confuse Git users a fair bit already!). I don’t mind reverse either, but I think it’s more ambiguous (maybe it could reverse commit ordering?) and the Git terminology is good enough that we can just reuse it.

(Anyway, maybe we should discuss this in a separate issue or something.)

@zx8
Copy link
Author

zx8 commented Feb 13, 2025

@emilazy #5688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants