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

Re: [PATCH v2 2/2] trailer: support multiline title

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2015, 16:05 UTC
Message-ID
<xmqqk2siujak.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAP8UFD2x8i5wC9JP8d1zAH=d-2BMYWAvpaFmWnu09N5QSG==TA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
> There is already code to detect a patch in interpret-trailers, but it
> relies on the patch starting with a line with only three dashes.

Hmm, then it can be taught to notice "everything below..." as another marker, right?

> Maybe. I don't know if there is a reason why the commit-msg is called
> before removing the patch.
Is that "removing", or are you talking about changing the order from
 - prepare log template in-core
 - add comments and patch to that in-core copy
 - write in-core copy out
 - run hook
 - read the hook's result in-core
 - use the message
to
 - prepare log template in-core
 - write in-core copy out
 - run hook
 - read the hook's result in-core
 - add comments and patch to that in-core copy
 - use the message

While the reordering would certainly stop showing the comments and patch, I am not sure if that is a move in the right direction. It will rob from the hooks information that they have traditionally been given---it will break some hooks.

But if interpret-trailers is almost there to reliably know where the log message ends, teaching it the one last step would be the right thing to do anyway. After all, interpret-trailers was invented exactly because we did not want individual hooks to roll their own ways to detect the end of the message proper, so the command should know where the message ends.

Previous: Christian CouderNext: Matthieu Moy
Message 6 of 9 in “trailer: ignore first line of message”
  1. 1/2 trailer: ignore first line of messageChristian Couder, Aug 26, 2015
  2. 2/2 trailer: support multiline titleChristian Couder, Aug 26, 2015
  3. Matthieu MoyAug 26, 2015
  4. Jacob KellerAug 26, 2015
  5. Christian CouderAug 26, 2015
  6. Junio C HamanoAug 26, 2015
  7. Matthieu MoyAug 26, 2015
  8. Junio C HamanoAug 26, 2015
  9. Christian CouderAug 29, 2015

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.