git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug Report: Multi-line trailers containing empty lines break parsing

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2021, 18:08 UTC
Message-ID
<xmqqr1k3w1g7.fsf@gitster.g>
In-Reply-To
<CAP8UFD0rRff7oCMH=DeTQ-tZw7STLwSHLecWxRr_rQVyHuxJuA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 9 quoted lines
>> > Any patch to relax how blank lines and other aspects of trailers
>> > parsing in my opinion should come with some documentation change to
>> > explain what we now accept and what we don't accept, and also tests to
>> > enforce that.
>>
>> OK.  But do we document clearly what we accept and we don't before
>> any change?
>
> Maybe it's not enough, but the doc already has the following:
OK.

The next step is to find out if there is anything unclear in the description of the current behaviour in that paragraph that may have resulted in the report of the "bug" that turned out to be a non-bug.

Show 16 quoted lines
> ------
> Existing trailers are extracted from the input message by looking for
> a group of one or more lines that (i) is all trailers, or (ii) contains at
> least one Git-generated or user-configured trailer and consists of at
> least 25% trailers.
> The group must be preceded by one or more empty (or whitespace-only) lines.
> The group must either be at the end of the message or be the last
> non-whitespace lines before a line that starts with '---' (followed by a
> space or the end of the line). Such three minus signs start the patch
> part of the message. See also `--no-divider` below.
>
> When reading trailers, there can be whitespaces after the
> token, the separator and the value. There can also be whitespaces
> inside the token and the value. The value may be split over multiple lines with
> each subsequent line starting with whitespace, like the "folding" in RFC 822.
> ------
Thanks.
Previous: ZheNing Hu
Message 12 of 12 in “Bug Report: Multi-line trailers containing empty lines break parsing”
  1. Matthias BuehlmannFeb 15, 2021
  2. Junio C HamanoFeb 16, 2021
  3. Taylor BlauFeb 16, 2021
  4. Junio C HamanoFeb 16, 2021
  5. Taylor BlauFeb 16, 2021
  6. Christian CouderMar 23, 2021
  7. Junio C HamanoMar 23, 2021
  8. Christian CouderMar 25, 2021
  9. ZheNing HuMar 25, 2021
  10. Junio C HamanoMar 25, 2021
  11. ZheNing HuMar 26, 2021
  12. Junio C HamanoMar 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.