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

Re: [RFC/PATCH 0/2] place cherry pick line below commit title

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 3, 2016, 19:17 UTC
Message-ID
<xmqqbmz16y42.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<e03fdabd-6690-5244-5f79-1715b0364845@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 9 quoted lines
> That sounds reasonable to me. Would a patch set to implement this new
> trailer block heuristic (in both sequencer and trailer) be reasonable?
> And if yes, should trailer know about the "(cherry picked from"
> prefix? (I can see it both ways - knowing about the "(cherry picked
> from" prefix would make it consistent with sequencer, but it seems
> like a detail that it shouldn't know about. Writing
> "Cherry-picked-from:" instead probably wouldn't solve our problem
> because, for backwards compatibility, we would still need to support
> reading the old format.)

If we were to go that route, I'd suggest keeping the historical practice supported, exactly because you would need to be prepared to cherry-pick an old commit.

It may be necessary for the code to analize the lines in a block identified as "likely to be a trailing block" more carefully, though. The example 59f0aa94 in the message you are responding to has "Link 1:" that consists of 3 physical lines. An instruction to interpret-trailers to add a new one _after_ "Link-$n:" may have to treat these as a single logical line and do the addition after them, i.e. before "Link 2:" line, for example.

I also saw
	Signed-off-by: Some body <some@body.xz> (some comment
        that extends to the next line without being indented)
	Sined-off-by: Some body Else <some.body@else.xz>

where the only clue that the second line is logically a part of the first one was the balancing of parentheses (or [brakets]). To accomodate real-world use cases, you may have to take into account a lot more than the strict rfc-822 style "line folding".

Previous: Jonathan TanNext: Jonathan Tan
Message 11 of 20 in “place cherry pick line below commit title”
  1. 0/2 place cherry pick line below commit titleJonathan Tan, Sep 29, 2016
  2. 2/2 sequencer: allow origin line below commit titleJonathan Tan, Sep 29, 2016
  3. 1/2 sequencer: refactor message and origin appendingJonathan Tan, Sep 29, 2016
  4. Junio C HamanoSep 29, 2016
  5. Jonathan TanSep 30, 2016
  6. Junio C HamanoSep 30, 2016
  7. Jonathan TanSep 30, 2016
  8. Junio C HamanoOct 3, 2016
  9. Junio C HamanoSep 30, 2016
  10. Jonathan TanOct 3, 2016
  11. Junio C HamanoOct 3, 2016
  12. Jonathan TanOct 3, 2016
  13. Junio C HamanoOct 3, 2016
  14. Jonathan TanOct 4, 2016
  15. Junio C HamanoOct 4, 2016
  16. Junio C HamanoOct 4, 2016
  17. Jonathan TanOct 5, 2016
  18. Junio C HamanoOct 6, 2016
  19. Jonathan TanOct 5, 2016
  20. Junio C HamanoOct 5, 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.