mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-03-22 12:44:37 -05:00
Breaking change footer together with other footers #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mainrs on GitHub (Dec 10, 2021).
The git trailer specification says that each pair of git trailers is separated by a newline only. Does that imply that, if a commit contains a breaking change, the footers have to come directly after it, without an empty newline after it?
This would be wrong:
This is correct:
@bcoe commented on GitHub (Dec 21, 2021):
I was picturing that this would work, but the
BREAKING CHANGEwould actually be parsed out of the body rather than from the footers.@mainrs commented on GitHub (Dec 22, 2021):
Strictly speaking, yes. A lot of repositories that follow CC do use the first notation. Probably to make it more obvious. But it does require more lenient parsing to parse correctly.
@Conaclos commented on GitHub (Aug 3, 2022):
In my opinion
BREAKING CHANGEshould not be treated as a trailer. Git does not by default recognize a spaced key as a git trailer. MoreoverBREAKING CHANGEsometimes spans on multiple lines. Multi-line git trailers are allowed, but they require a blank character at the beginning of every line and are generally discouraged :git interpret-trailerone-line them.I personally use the following format:
If you really want to use a git trailer I could advice you to use "BREAKING-CHANGE" and a single line of description.
@chbi commented on GitHub (Sep 1, 2022):
I faced the same issue: "BREAKING CHANGE" does not meet the git trailer convention and breaks our tooling (validation of commit messages using jgit). Our devs interpret "footer" (as used in CC) as "trailer" (as used in Git documentation) and use it that way.
As a workaround, I wrote "our own CC definition", that only allows "BREAKING-CHANGE" as the token in Git trailers.
I suggest one or both of the following:
Concerning Git-Trailers: There is also a discussion on the Git mailing list: https://lore.kernel.org/git/xmqq4jy18q7h.fsf@gitster.g/. Git trailer documentation currently allows whitespace in the token part of trailers, while no major Git implementation does. It appears that git documentation will be fixed and will no longer allow whitespace in git trailers.
@relaxdiego commented on GitHub (Feb 19, 2023):
It would be good if
BREAKING CHANGE:was converted into a well-formed git trailer which complies with RFC 822. Specifically, the meta-syntax1*<any CHAR, excluding CTLs, SPACE, and ":">(e.g.BREAKING-CHANGE:) so that it becomes acceptable to a larger set of git users.Being RFC 822 compliant would also mean breaking changes would show up when certain
git logcommands are executed. For example:@LemmingAvalanche commented on GitHub (Mar 20, 2024):
@Conaclos (fwiw)
I haven’t seen it be discouraged.
You can’t have multiple paragraphs though. Like this.
No, only if you explicitly ask for
--unfold.