BUG: Nested lists, tables, git trailers mangled by hard wrapping from "Pull request title and description" default commit message setting #186940
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
The "Default commit message: Pull request title and description" setting is nice, to automatically fill out commit messages with useful information.
This process involves hard-wrapping the text to align to Git's "72 characters" guideline, which is good in most cases.
However, the current algorithm mangles several useful constructs, causing the meaning to change and thus the commit message to be somewhere between "hard to read", "misleading", and "missing critical information". For instance:
Notably, the hard-wrapping algorithm isn't completely naive: it already avoids wrapping long lines within code blocks (yay).
Expected behaviour
It would be great if the hard-wrapping had better handling of these extra constructs, in addition to its existing handling of code blocks:
1.or-indicator), then re-insert appropriate leading spaces as a prefix on all wrapped linesThanks!
Example
Expand for original rendering
Desirable behaviour
Here's a normal paragraph with long lines that would be preferable to be wrapped, following, for instance, https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html#_commit_guidelines which says "Wrap it to about 72 characters or so".
Undesirable behaviour
Demo-Trailer: this is a very long line and also here's the spec that says "may be split over multiple lines with each subsequent line starting with at least one whitespace" https://git-scm.com/docs/git-interpret-trailers
Expand for mangled commit message rendering
Desirable behaviour
Here's a normal paragraph with long lines that would be preferable to be
wrapped, following, for instance,
https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html#_commit_guidelines
which says "Wrap it to about 72 characters or so".
Undesirable behaviour
so so so so so so long
going and going and going and going and going and going and going and
going
very very very very very very very very very very very long
so so so so so so so long
going and going and going and going and going and going and going and
going
very very very very very very very very very very very long
Demo-Trailer: this is a very long line and also here's the spec that
says "may be split over multiple lines with each subsequent line
starting with at least one whitespace"
https://git-scm.com/docs/git-interpret-trailers
See also
Beta Was this translation helpful? Give feedback.
All reactions