All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Nikita Bobko <nikitabobko@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [Bug report] git format-patch + git am doesn't preserve original commit message
Date: Thu, 10 Jun 2021 17:36:43 +0200	[thread overview]
Message-ID: <CAMJzOtx9D7KthsUi7eLcmz7rszOQh8t=-VhXeOGDX1CMV1iERQ@mail.gmail.com> (raw)
In-Reply-To: <YMIrkBiCpUXcUwsW@coredump.intra.peff.net>

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 <peff@peff.net> wrote:
>
> On Thu, Jun 10, 2021 at 05:04:58PM +0200, Nikita Bobko wrote:
>
> > 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

  reply	other threads:[~2021-06-10 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 15:04 [Bug report] git format-patch + git am doesn't preserve original commit message Nikita Bobko
2021-06-10 15:11 ` Jeff King
2021-06-10 15:36   ` Nikita Bobko [this message]
2021-06-10 16:29     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMJzOtx9D7KthsUi7eLcmz7rszOQh8t=-VhXeOGDX1CMV1iERQ@mail.gmail.com' \
    --to=nikitabobko@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.