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

Re: [PATCH] sequencer: support folding in rfc2822 footer

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 6, 2016, 22:08 UTC
Message-ID
<29cb0f55-f729-80af-cdca-64e927fa97c0@google.com>
In-Reply-To
<xmqqy439rabb.fsf@gitster.mtv.corp.google.com>
On 09/02/2016 07:23 PM, Junio C Hamano wrote:
Show 13 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
>
>> Sample-field: multiple-line field body
>>  that causes a blank line below
>
> I am not sure this is unconditionally good, or may cause problems to
> those with workflows you did not consider when you wrote this patch.
>
> Not being too lenient here historically has been a deliberate
> decision to avoid misidentification of non "footers".  Does Git
> itself produce some folded footer line?  If Git itself produced such
> folded lines, I'd be a lot more receptive to this change, but I do
> not think that is the case here.

I don't think Git produces any folded lines, but folded lines do appear in footers in projects that use Git. For example, some Android commits have multi-line "Test:" fields (example, [1]) and some Linux commits have multi-line "Tested-by:" fields (example, [2]).

Taking the Android commit as an example, this would mean that cherrypicking that commit would create a whole new footer, and tripping up tools (for example, Gerrit, which looks for "Change-Id:" in the last paragraph). But this would not happen if "Test:" was single-line instead of multi-line - which seems inconsistent.

[1] https://android.googlesource.com/platform/frameworks/base/+/4c5281862f750cbc9d7355a07ef1a5545b9b3523 [2] https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable/+/69f92f67b68ab7028ffe15f0eea76b59f8859383

Show 15 quoted lines
> A slightly related tangent.  An unconditionally good change you
> could make is to allow folding of in-body headers.  I.e. you can
> have e.g.
>
> 	-- >8 --
> 	Subject: [PATCH] sequencer: support in-body headers that are
>          folded according to RFC2822 rules
>
> 	The first paragraph after the above long title begins
> 	here...
>
> in the body of the msssage, and I _think_ we do not fold it properly
> when applying such a patch.  We should, as that is something that
> appears in format-patch output (i.e. something Git itself produces,
> unlike the folded "footer").
OK, I'll take a look at this.
Previous: Junio C HamanoNext: Jonathan Tan
Message 3 of 24 in “sequencer: support folding in rfc2822 footer”
  1. sequencer: support folding in rfc2822 footerJonathan Tan, Sep 2, 2016
  2. Junio C HamanoSep 3, 2016
  3. Jonathan TanSep 6, 2016
  4. Jonathan TanSep 6, 2016
  5. Jeff KingSep 7, 2016
  6. 0/3 handle multiline in-body headersJonathan Tan, Sep 16, 2016
  7. 1/3 mailinfo: refactor commit message processingJonathan Tan, Sep 16, 2016
  8. Junio C HamanoSep 16, 2016
  9. Jeff KingSep 16, 2016
  10. 2/3 mailinfo: correct malformed test exampleJonathan Tan, Sep 16, 2016
  11. Junio C HamanoSep 16, 2016
  12. Jonathan TanSep 16, 2016
  13. Junio C HamanoSep 16, 2016
  14. Jonathan TanSep 17, 2016
  15. Junio C HamanoSep 17, 2016
  16. 3/3 mailinfo: handle in-body header continuationsJonathan Tan, Sep 16, 2016
  17. Junio C HamanoSep 16, 2016
  18. Jonathan TanSep 16, 2016
  19. Junio C HamanoSep 16, 2016
  20. Jonathan TanSep 16, 2016
  21. Junio C HamanoSep 16, 2016
  22. Jonathan TanSep 17, 2016
  23. Jeff KingSep 16, 2016
  24. Junio C HamanoSep 16, 2016

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.