Thread (4 messages) flat view 4 messages, 2 authors, 2021-06-10

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

From: Nikita Bobko <hidden>
Date: 2021-06-10 15:36:25

Oh, I see, thank you, it works.

But actually, I am not sure that it's "expected" behavior. I would
expect git to preserve original message by default without any
additional flags. Shouldn't `--keep-non-patch` flag in `git am` be
enabled by default then?

On Thu, Jun 10, 2021 at 5:11 PM Jeff King [off-list ref] wrote:
On Thu, Jun 10, 2021 at 05:04:58PM +0200, Nikita Bobko wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help