Subject: git mailinfo with patch parser

From: Florian Weimer <[email-masked]>
Date: Wed, 02 Oct 2019 06:43:35 +0200

git mailinfo splits a message into headers, commit message, and patch
text, but does not actually parse the patch text.  As a result, the
patch portion produced by git mailinfo can contain something that
looks like a patch, but actually isn't.

Is there a way to get the patch data, as parsed by git apply or git
am, and dump it back in patch format, without actually applying the
patch to a working tree?