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?