[RFC/PATCH 0/3] support mboxrd format
- From
- Eric Wong <e@80x24.org>
- Date
- May 30, 2016, 23:21 UTC
- Message-ID
- <20160530232142.21098-1-e@80x24.org>
Sometimes users will copy+paste an entire mbox into a commit message, leading to bad splits when a patch is output as an email.
Unlike other mbox-family formats, mboxrd allows reversible round-tripping while avoiding bad splits for old "mboxo" readers.
I'm also considering altering the current "From ${COMMIT} Mon Sep 17 00:00:00 2001" line to something else so mailsplit (or "am") can autodetect.
Maybe:
From ${COMMIT}@mboxrd Mon Sep 17 00:00:00 2001
?We may also want to default to single escaping "From " in commit messages for --pretty=email to avoid corruption when somebody copy+pastes an mbox into the commit message. This is a technically incompatible change, but I think it's preferable to breaking splitting complete.
In other words, --pretty=email changes to output "mboxo" for now.
Long term (possibly git 3.0?), maybe mboxrd can become the default mail format. IMHO, it should've been since 2005.
ref: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
Eric Wong (3):
pretty: support "mboxrd" output format
mailsplit: support unescaping mboxrd messages
am: support --patch-format=mboxrdDocumentation/git-am.txt | 3 ++- Documentation/git-mailsplit.txt | 7 ++++++- builtin/am.c | 14 ++++++++++--- builtin/log.c | 2 +- builtin/mailsplit.c | 23 +++++++++++++++++++++ commit.h | 6 ++++++ log-tree.c | 4 ++-- pretty.c | 45 +++++++++++++++++++++++++++++++++-------- t/t4014-format-patch.sh | 27 +++++++++++++++++++++++++ t/t4150-am.sh | 20 ++++++++++++++++++ t/t5100-mailinfo.sh | 13 ++++++++++++ t/t5100/0001mboxrd | 4 ++++ t/t5100/0002mboxrd | 3 +++ t/t5100/sample.mboxrd | 17 ++++++++++++++++ 14 files changed, 172 insertions(+), 16 deletions(-)