From: Jeff King Date: Wed, 12 Feb 2020 02:24:41 GMT Subject: Re: bug? illegal text in commit log Message-ID: <20200212022441.GA2963695@coredump.intra.peff.net> In-Reply-To: <3cd137fa-b879-9850-0b81-5f907623ee6d@web.de> On Fri, Feb 07, 2020 at 09:30:59PM +0100, René Scharfe wrote: > My problem with the situation is that innocent-looking commits that > can be diffed, pushed and pulled suddenly fall apart when used in a > mail-based workflow or with rebase am. Maybe we could automatically write ">diff" in such mails? :) Speaking of which, try this: git init echo base >file git add file git commit -m base echo change >file { echo subject echo echo "From fc4ee3386d6db204b00b45889ef42400b9e18eed Mon Sep 17 00:00:00 2001" } | git commit -a -F - git format-patch --stdout -1 >patch git reset --hard HEAD^ git am patch mboxrd fixes this, but it's not the default. -Peff