git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jan Engelhardt <jengelh@inai.de>
Cc: git@vger.kernel.org
Subject: Re: git-format-patch does not encode lines starting with "From"
Date: Mon, 28 Jun 2021 10:08:17 +0200	[thread overview]
Message-ID: <87sg12wgen.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <5oq2985q-o266-8p5o-n197-8nq8s6p83oon@vanv.qr>


On Sun, Jun 27 2021, Jan Engelhardt wrote:

> Summary
> =======
>
> git-format-patch in 2.32.0 fails to quote/escape lines starting with
> "From ", and mbox readers conclude there is an empty mail.
>
>
> Observed
> ========
>
> $ git commit -m 'subject
>
> From ffffffffffffffffffffffffffffffffffffffff Mon Sep 17 00:00:00 2001
> with love.'
> $ git format-patch HEAD^!
> $ head 0001-subject.patch
> From d489071b4855a49b32e9b5ae5addd982d2ed8d7d Mon Sep 17 00:00:00 2001
> From: Jan Engelhardt <jengelh@inai.de>
> Date: Sun, 27 Jun 2021 20:04:20 +0200
> Subject: [PATCH] subject
>
> From ffffffffffffffffffffffffffffffffffffffff Mon Sep 17 00:00:00 2001
> with love.
>
> $ git reset --hard HEAD^
> $ git am -p0 0001-subject.patch
> Patch is empty.
> When you have resolved this problem, run "git am --continue".
>
>
> Expected to see
> ===============
>
> $ head 0001-subject.patch
> From d489071b4855a49b32e9b5ae5addd982d2ed8d7d Mon Sep 17 00:00:00 2001
> From: Jan Engelhardt <jengelh@inai.de>
> Date: Sun, 27 Jun 2021 20:04:20 +0200
> Subject: [PATCH] subject
>
>>From ffffffffffffffffffffffffffffffffffffffff Mon Sep 17 00:00:00 2001
> with love.

"git format-patch --pretty=mboxrd" and "git am --patch-format" should
solve this issue for you.

      reply	other threads:[~2021-06-28  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 18:08 git-format-patch does not encode lines starting with "From" Jan Engelhardt
2021-06-28  8:08 ` Ævar Arnfjörð Bjarmason [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87sg12wgen.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jengelh@inai.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).