-
Notifications
You must be signed in to change notification settings - Fork 353
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
describe: add ignore-rest directive #5155
Conversation
Updated the todo: tests, docs |
Just fyi, #3828 should be compatible with scissors. The "JJ: describe " line should be parsed first. (BTW, we tend to include details in commit messages than in PR description.) |
daf2247
to
8707ea0
Compare
Oh, didn't notice that. Updated to only require one line. |
I think @arxanas had a good point about discoverability. Something like "JJ: ignore-after" or "JJ: ignore-rest" is a lot clearer and more searchable. |
8707ea0
to
e624a7f
Compare
Changed to I do have a concern about docs. There didn't seem to be a good place to put it, so right now it's only mentioned in the changelog and "default description" config. If we keep adding similar directives ( |
Just found the line in the default config referencing #1946, which this also provides the ability to solve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
e624a7f
to
768b30e
Compare
This implements "scissor" lines. For example: this text is included in the commit message JJ: ignore-rest this text is not, and is encouraged to be rendered as a diff JJ: ignore-rest this text is *still not* included in the commit message When editing multiple commit messages, the `JJ: describe {}` lines are parsed before the description is cleaned up. That means that the following will correctly add descriptions to multiple commits: JJ: describe aaaaaaaaaaaa this text is included in the first commit message JJ: ignore-rest scissored... JJ: describe bbbbbbbbbbbb this text is included in the first commit message JJ: ignore-rest scissored...
768b30e
to
9806a94
Compare
Sorry for the late reply. The overall approach and naming seems good to me. If we add more |
Implements #4210
Instead of a scissor line, this implements a scissor section. Everything between a pair of scissor lines is ignored. This allows it to work with #3828, as long as you put the ending line. Currently the beginning and ending lines are the same, so only one alias is required. Could easily be separated.Implements a single scissor line, since
JJ: describe
lines are parsed first. Everything after a scissor line, before aJJ: describe
line is ignored.Open to other ideas on the style of the scissor lines. Additionally, the
scissor
template alias does not insert the "Do not modify or remove the line above." line from git --- should it? I lean softly towards no, since the user would have to seek out the alias to end up with it.Example usage
Checklist
If applicable:
CHANGELOG.md