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
embed-from.in
empty mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
info0001
info0002 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0003
info0004
info0005
info0006
info0007
info0008
info0009
info0010
info0011
info0012
info0013
info0014
info0014--scissors
info0015
info0015--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
info0016
info0016--no-inbody-headers
info0017
info-from.expect
info-from.in
msg0001 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
msg0002
msg0003
msg0004
msg0005
msg0006
msg0007
msg0008
msg0009
msg0010
msg0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
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 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0004
patch0005
patch0006 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0007 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
patch0008 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
patch0009
patch0010
patch0011
patch0012 mailinfo: correctly handle multiline 'Subject:' header 2009-01-10 17:54:30 -08:00
patch0013
patch0014
patch0014--scissors
patch0015
patch0015--no-inbody-headers
patch0016
patch0016--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
patch0017
quoted-from.expect mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
quoted-from.in
rfc2047-info-0001
rfc2047-info-0002
rfc2047-info-0003
rfc2047-info-0004 mailinfo: cleanup extra spaces for complex 'From:' 2009-02-01 12:11:15 -08:00
rfc2047-info-0005
rfc2047-info-0006
rfc2047-info-0007
rfc2047-info-0008
rfc2047-info-0009
rfc2047-info-0010 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0011
rfc2047-samples.mbox t5100: use ancient encoding syntax for backwards compatibility 2009-05-18 20:53:19 -07:00
sample.mbox Merge branch 'jc/maint-mailinfo-mime-attr' 2012-09-25 10:39:56 -07:00