Is your feature request related to a problem? Please describe.
When I want to update the description of many commits in bulk, for example to add a trailer to each commit, or strip a wip: prefix that I often put in front of my commits while working on them, I need to either call jj describe interatively, or call it once for each commmit in sequence.
Describe the solution you'd like
It would be very nice if jj describe supported --template as an alternative to --message, which could generate the message for each commit based on a template expression.
For example, to add a trailer to all commits, one could then do
jj describe -r 'my_revset()' --template 'description ++ "\n\nMy-trailer: Something Something"'
It would also be nice if this applied to other commands that take --message, such as jj new and jj commit.
Describe alternatives you've considered
As mentioned, I could do the same interactively. If it involves a large number of commits, I would likely need to do some scripting within my editor, though.
Alternatively, I could do this in a three-step process, running several jj commands (possibly scripted):
- Expand revset to a list of commits
- For each commit, read the existing description (or other fields that the new description would be based on)
- For each commit, run
jj describe to update the description
Is your feature request related to a problem? Please describe.
When I want to update the description of many commits in bulk, for example to add a trailer to each commit, or strip a
wip:prefix that I often put in front of my commits while working on them, I need to either calljj describeinteratively, or call it once for each commmit in sequence.Describe the solution you'd like
It would be very nice if
jj describesupported--templateas an alternative to--message, which could generate the message for each commit based on a template expression.For example, to add a trailer to all commits, one could then do
It would also be nice if this applied to other commands that take
--message, such asjj newandjj commit.Describe alternatives you've considered
As mentioned, I could do the same interactively. If it involves a large number of commits, I would likely need to do some scripting within my editor, though.
Alternatively, I could do this in a three-step process, running several
jjcommands (possibly scripted):jj describeto update the description