This way we don't get it in the commit message, even if the patch had
been generated by cogito (or CVS, ugh) and people didn't add the proper
"---" marker.
..and git-apply does a lot better job at it anyway.
Also, we break the comment/diff on a line that starts with "diff -", not
just on the "---" line. Especially for git diffs, we actually want that
line in the diff.
(We should probably also break on "Index: ..." followed by "=====")
Now that git does pretty reliable date parsing, we might as well get
the date from the email itself. Of course, it's still questionable
whether the date on the email is all that relevant, but it's certainly
no worse than taking the commit date.
I looked a bit at my old BK tools for the same thing, but they were
just so horrid in many ways that I largely rewrote it all and these
tools do things a bit differently. Instead of aggressively piping
data from one process to another (which was clever but very hard
to follow), this first just splits out the mbox into many smaller
email files, and then does some scripts on these temporary files.