Re: bug? illegal text in commit log
- From
René Scharfe <l.s.r@web.de>
- Date
- Feb 4, 2020, 21:10 UTC
- Message-ID
- <b005193f-24b7-7b6f-f3dc-c7a98db14ed7@web.de>
- In-Reply-To
- <20200204010524-mutt-send-email-mst@kernel.org>
Am 04.02.20 um 07:14 schrieb Michael S. Tsirkin:
> It seems that it's not too hard to make commits such that > the standard way of git format-patch -> email -> git am > fails.
Show 7 quoted lines
> A work around is "don't do it" - avoid putting anything that looks like > a unified diff in the commit log. > > However: > - Users don't know what other restrictions exist > - User sending the patch has no way to detect failure, > it's only visible to user receiving the patch
Putting a diff in a commit message can be useful, and forbidding it is hard to justify.
> Ideas: > - validate commit log and warn users?
That's only better than the status quo insofar it turns the issue from a hidden pitfall into an open one.
> - find a way to escape text in git format-patch, and unescape in git am?
Like a Lines: header specifying the number of lines in the commit message?
René