-
Notifications
You must be signed in to change notification settings - Fork 899
Commit messages are prettified by default when the history is rewritten #621
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
Comments
I'm cool with adding an option, but by default I'd suggest we go with the breaking change and not prettify without permission. |
This, and what @carlosmn said on the other thread. I'd go further, and say that this shouldn't be an option at all; if the caller wants the message to be prettified, she can prettify it on her own. |
Ok. Let's start with the breaking change. We'll think about adding the option later, if that is ever required. |
About the option: this is history rewriting, which means it's just as likely that someone else wrote the message, on another machine at another time. This means that we have zero idea what their comment character is. Even if changing it is not the most common option, prettifying a message from someone else without user confirmation can lose arbitrary parts of a message (e.g. a line where it happened to be that the first char was '#' because they were referencing an issue number, or a markdown heading, or...) |
@carlosmn You're making a very good point. |
Pretty sure we don't publicly expose prettify, nor do I expect we wish to? I'm also cool with no option. |
Whether we do or not, I want to put the caller in the driver's seat here. If they want to rot13-encode the whole thing, turn it upside down, or just rewrap it according to their project's rules, that's up to them. Now, having a public |
@nulltoken This seems like a bug to me, and / or an additive API change to |
Agreed |
The default prettifying behabiour now is: do not prettify Documentation for the new property of RewriteHistoryOptions
We accept the prettify option via the history rewriter options, so the caller is in control. Closing thus. |
cf @amibar's findings in #619
RewriteHistoryOptions
and let the caller control this behavior?The text was updated successfully, but these errors were encountered: