git-commit-vandalism/t/t5100
Jeff King 2da1f36671 mailinfo: make ">From" in-body header check more robust
Since commit 81c5cf7 (mailinfo: skip bogus UNIX From line inside
body, 2006-05-21), we have treated lines like ">From" in the body as
headers. This makes "git am" work for people who erroneously paste
the whole output from format-patch:

  From 12345abcd...fedcba543210 Mon Sep 17 00:00:00 2001
  From: them
  Subject: [PATCH] whatever

into their email body (assuming that an mbox writer then quotes
"From" as ">From", as otherwise we would actually mailsplit on the
in-body line).

However, this has false positives if somebody actually has a commit
body that starts with "From "; in this case we erroneously remove
the line entirely from the commit message. We can make this check
more robust by making sure the line actually looks like a real mbox
"From" line.

Inspect the line that begins with ">From " a more carefully to only
skip lines that match the expected pattern (note that the datestamp
part of the format-patch output is designed to be kept constant to
help those who write magic(5) entries).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-16 11:05:46 -07:00
..
.gitattributes
embed-from.expect mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
embed-from.in mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
empty
info0001
info0002
info0003
info0004
info0005
info0006 mailinfo: do not get confused with logical lines that are too long. 2007-02-27 01:02:32 -08:00
info0007
info0008
info0009
info0010
info0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
info0012
info0013
info0014
info0014--scissors
info0015
info0015--no-inbody-headers
info0016
info0016--no-inbody-headers
info0017
info-from.expect
info-from.in
msg0001
msg0002
msg0003
msg0004
msg0005
msg0006
msg0007
msg0008
msg0009
msg0010
msg0011
msg0012
msg0013
msg0014
msg0014--scissors
msg0015
msg0015--no-inbody-headers
msg0016
msg0016--no-inbody-headers
msg0017
nul-b64.expect
nul-b64.in
nul-plain
patch0001
patch0002
patch0003
patch0004
patch0005
patch0006
patch0007
patch0008
patch0009 mailinfo: feed only one line to handle_filter() for QP input 2008-02-15 22:16:34 -08:00
patch0010
patch0011
patch0012
patch0013
patch0014
patch0014--scissors
patch0015
patch0015--no-inbody-headers
patch0016
patch0016--no-inbody-headers
patch0017
quoted-from.expect mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
quoted-from.in mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
rfc2047-info-0001
rfc2047-info-0002 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0003
rfc2047-info-0004
rfc2047-info-0005
rfc2047-info-0006
rfc2047-info-0007
rfc2047-info-0008
rfc2047-info-0009
rfc2047-info-0010
rfc2047-info-0011
rfc2047-samples.mbox
sample.mbox