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

Re: [PATCH] trailer: ignore first line of message

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 21, 2015, 07:01 UTC
Message-ID
<vpqk2sprupd.fsf@anie.imag.fr>
In-Reply-To
<1440107955-26892-1-git-send-email-chriscool@tuxfamily.org>
Christian Couder <christian.couder@gmail.com> writes:
> When looking for the start of the trailers in the message
> we are passed, we should ignore the first line of the message.
Thanks, this fixes my issue.
There's one more corner-case I've just thought of:

git commit -m 'place of code: change we made'

(with the line break)

Git considers this message as a summary line broken in the middle. "git log --oneline" shows it as a one-liner, as if it were 'place of code: change we made'.

Even with your patch, the trailer is added without a blank line, and renders on the subject line in `git log --oneline`. My command above with a commit-msg hook outputs:

[master 86f32d5] place of: code: change we made Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
(on a single line)

I do not care deeply, but you may want to let interpret-trailers deal with this case too.

Thanks,
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Christian Couder
Message 4 of 4 in “Minor annoyance with 'git interpret-trailers'”
  1. Matthieu MoyAug 20, 2015
  2. Christian CouderAug 20, 2015
  3. trailer: ignore first line of messageChristian Couder, Aug 20, 2015
  4. Matthieu MoyAug 21, 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.