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

Add option in git-am to ignore leading text?

From
FPFrans Pop <elendil@planet.nl>
Date
Jul 28, 2009, 03:13 UTC
Message-ID
<200907280513.59374.elendil@planet.nl>
The git-am manpage currently says:
  The body of the message (iow, after a blank line that terminates RFC2822
  headers) can begin with "Subject:" and "From:" lines that are different
  from those of the mail header, to override the values of these fields.

That's a very useful feature. However, on lkml there are frequently also mails with the following structure (example: [1]).

<example> [Regular mail headers, including From: and Subject:]

[Comments, quotes from previous messages, or some introduction]
From: [email address]
Subject: [patch short description]
[patch long description]

[patch diff] </example>

Here the overruling pseudo-headers are not at the beginning of the message, which results in all the leading comments getting included in the commit log and those have to be cleaned manually.

Would it be possible to add an option to git-am to "reset" the commit log when it encounters either a From: or Subject: pseudo header, so that only the intended patch short and long descriptions are used for the commit log?

Or is this already possible somehow?

Cheers, FJP

[1] http://lkml.org/lkml/2009/7/10/49
Next: Nicolas Sebrecht
Message 1 of 7 in “Add option in git-am to ignore leading text?”
  1. Frans PopJul 28, 2009
  2. Nicolas SebrechtJul 28, 2009
  3. Mark BrownJul 28, 2009
  4. Frans PopJul 28, 2009
  5. Nicolas SebrechtJul 28, 2009
  6. Frans PopJul 28, 2009
  7. Frans PopJul 28, 2009

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.