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

Re: [PATCH 4/4] sequencer: use trailer's trailer layout

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 1, 2016, 17:38 UTC
Message-ID
<a416ab9b-ff1f-9a71-3e58-60fd4f8a6b8e@google.com>
In-Reply-To
<xmqqeg2wqa1e.fsf@gitster.mtv.corp.google.com>
On 10/31/2016 06:11 PM, Junio C Hamano wrote:
Show 21 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
>> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
>> index ba4902d..635b394 100755
>> --- a/t/t4014-format-patch.sh
>> +++ b/t/t4014-format-patch.sh
>> @@ -1277,8 +1277,7 @@ EOF
>>  4:Subject: [PATCH] subject
>>  8:
>>  9:I want to mention about Signed-off-by: here.
>> -10:
>> -11:Signed-off-by: C O Mitter <committer@example.com>
>> +10:Signed-off-by: C O Mitter <committer@example.com>
>>  EOF
>>  	test_cmp expected actual
>>  '
>
> The original log message is a single-liner subject line, blank, "I
> want to mention..." and when asked to append S-o-b:, we would want
> to see a blank before the added S-o-b, no?
>
> This seems a bit weird.

This is because the "I want to mention" block has 100% trailer lines (since its only line contains a colon). We could forbid spaces in trailer field names, but as you said [1], it might be better to allow them since users might include them.

The original sequencer.c interpreted this block as not a trailer block, because it only accepted alphanumeric characters or '-' before the colon (and no spaces) - hence the difference in behavior.

[1] <xmqqbmyhr4vt.fsf@gitster.mtv.corp.google.com>
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 30 in “Make other git commands use trailer layout”
  1. 0/4 Make other git commands use trailer layoutJonathan Tan, Oct 29, 2016
  2. 1/4 commit: make ignore_non_trailer take buf/lenJonathan Tan, Oct 29, 2016
  3. 2/4 trailer: avoid unnecessary splitting on linesJonathan Tan, Oct 29, 2016
  4. Christian CouderOct 29, 2016
  5. Junio C HamanoOct 31, 2016
  6. Junio C HamanoOct 31, 2016
  7. 3/4 trailer: have function to describe trailer layoutJonathan Tan, Oct 29, 2016
  8. Junio C HamanoOct 31, 2016
  9. 4/4 sequencer: use trailer's trailer layoutJonathan Tan, Oct 29, 2016
  10. Junio C HamanoNov 1, 2016
  11. Jonathan TanNov 1, 2016
  12. Junio C HamanoNov 1, 2016
  13. Junio C HamanoOct 29, 2016
  14. Christian CouderOct 29, 2016
  15. 0/5 Make other git commands use trailer layoutJonathan Tan, Nov 1, 2016
  16. 1/5 trailer: be stricter in parsing separatorsJonathan Tan, Nov 1, 2016
  17. Junio C HamanoNov 1, 2016
  18. Junio C HamanoNov 1, 2016
  19. Jonathan TanNov 1, 2016
  20. Junio C HamanoNov 1, 2016
  21. 2/5 commit: make ignore_non_trailer take buf/lenJonathan Tan, Nov 1, 2016
  22. 3/5 trailer: avoid unnecessary splitting on linesJonathan Tan, Nov 1, 2016
  23. 5/5 sequencer: use trailer's trailer layoutJonathan Tan, Nov 1, 2016
  24. 4/5 trailer: have function to describe trailer layoutJonathan Tan, Nov 1, 2016
  25. 0/5 Make other git commands use trailer layoutJonathan Tan, Nov 2, 2016
  26. 1/5 trailer: be stricter in parsing separatorsJonathan Tan, Nov 2, 2016
  27. 2/5 commit: make ignore_non_trailer take buf/lenJonathan Tan, Nov 2, 2016
  28. 3/5 trailer: avoid unnecessary splitting on linesJonathan Tan, Nov 2, 2016
  29. 5/5 sequencer: use trailer's trailer layoutJonathan Tan, Nov 2, 2016
  30. 4/5 trailer: have function to describe trailer layoutJonathan Tan, Nov 2, 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.