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

Re: [Bug report] git format-patch + git am doesn't preserve original commit message

From
Jeff King <peff@peff.net>
Date
Jun 10, 2021, 15:11 UTC
Message-ID
<YMIrkBiCpUXcUwsW@coredump.intra.peff.net>
In-Reply-To
<CAMJzOtzu-fKxtseSPQ8riTC-kfg1CphnXN=EN-rnxVo85dZvFw@mail.gmail.com>
On Thu, Jun 10, 2021 at 05:04:58PM +0200, Nikita Bobko wrote:
Show 13 quoted lines
> Steps to reproduce:
> ```
> git init
> git commit --allow-empty -m 'root'
> echo foo > foo
> git add .
> git commit -m '[tag] foo'
> git checkout @~
> git format-patch master~..master
> cat 0001-tag-foo.patch | git am
> ```
> Expected: commit message generated by `git am` is `[tag] foo`
> Actual: commit message generated by `git am` is `foo`

This is working as intended. See the "-k" option of git-am and git-mailinfo (and also "-b" for mailinfo).

-Peff
Previous: Nikita BobkoNext: Nikita Bobko
Message 2 of 4 in “[Bug report] git format-patch + git am doesn't preserve original commit message”
  1. Nikita BobkoJun 10, 2021
  2. Jeff KingJun 10, 2021
  3. Nikita BobkoJun 10, 2021
  4. Jeff KingJun 10, 2021

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.