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

Re: [PATCH] [RFC] add Message-ID field to log on git-am operation

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 22, 2008, 19:51 UTC
Message-ID
<7v4payilkp.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1206136805-20115-1-git-send-email-agladkov@parallels.com>
This is a mixed bag.

Your changes to mailinfo is fine, and I think it may make even more sense to also parse out In-Reply-To: and References: to capture the message context better.

On the other hand, I'd NAK changes to pretty.c and commit-tree.c; it is wrong to place that information in new commit object header. The commit object header is a place to store information common to all commit objects (authorship and committer) and the structural information that is required to correctly handle the commit objects (pointers to trees and commits, and encoding that tells what the message part is in if it is not in UTF-8).

Just like workflows inspired by the kernel project use Signed-off-by: and
Acked-by: information in the commit message part to keep track of the flow
of patches, and some distro folks say "Closes #nnn" in their messages to
close their issue tracking system entries, your "message" is information
only useful to a particular workflow and convention, and belongs to the
commit log message body, not in the object header.

Wouldn't it work equally well to use applypatch-msg hook? Use your updated mailinfo to parse necessary information out of the incoming message, and add Message-ID: to the commit log messsage, perhaps at the end, in that hook?

Previous: Anton GladkovNext: Anton Gladkov
Message 2 of 5 in “[RFC] add Message-ID field to log on git-am operation”
  1. [RFC] add Message-ID field to log on git-am operationAnton Gladkov, Mar 21, 2008
  2. Junio C HamanoMar 22, 2008
  3. Anton GladkovMar 23, 2008
  4. Junio C HamanoMar 23, 2008
  5. Anton GladkovMar 24, 2008

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.