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 Mark files in t/t5100 as UTF-8 2009-10-21 11:27:50 -07:00
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 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
info0001 mailinfo: cleanup extra spaces for complex 'From:' 2009-02-01 12:11:15 -08:00
info0002 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0003 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0004 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0005 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0006 mailinfo: do not get confused with logical lines that are too long. 2007-02-27 01:02:32 -08:00
info0007 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
info0008
info0009 mailinfo: feed only one line to handle_filter() for QP input 2008-02-15 22:16:34 -08:00
info0010 git-mailinfo: Fix getting the subject from the in-body [PATCH] line 2008-07-13 17:21:15 -07:00
info0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
info0012 Revert "mailinfo: Remove only one set of square brackets" 2009-07-15 15:10:06 -07:00
info0013 mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' 2009-01-28 15:12:24 -08:00
info0014 am/mailinfo: Disable scissors processing by default 2009-08-26 22:22:22 -07:00
info0014--scissors
info0015 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
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 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
info0016--no-inbody-headers
info0017 mailinfo: do not concatenate charset= attribute values from mime headers 2012-09-17 15:24:52 -07:00
info-from.expect
info-from.in mailinfo: avoid violating strbuf assertion 2008-08-19 19:36:56 -07:00
msg0001 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
msg0002 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
msg0003
msg0004 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
msg0005 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
msg0006 mailinfo: do not get confused with logical lines that are too long. 2007-02-27 01:02:32 -08:00
msg0007 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
msg0008 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
msg0009
msg0010
msg0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
msg0012
msg0013 mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' 2009-01-28 15:12:24 -08:00
msg0014 am/mailinfo: Disable scissors processing by default 2009-08-26 22:22:22 -07:00
msg0014--scissors am/mailinfo: Disable scissors processing by default 2009-08-26 22:22:22 -07:00
msg0015 mailinfo: do not strip leading spaces even for a header line 2010-02-19 21:55:33 -08:00
msg0015--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
msg0016 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
msg0016--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
msg0017 mailinfo: do not concatenate charset= attribute values from mime headers 2012-09-17 15:24:52 -07:00
nul-b64.expect mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepaths 2008-05-25 13:22:18 -07:00
nul-b64.in mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepaths 2008-05-25 13:22:18 -07:00
nul-plain t5100: Avoid filename "nul" 2008-05-27 23:12:29 -07:00
patch0001 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0002 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0003
patch0004
patch0005 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0006 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0007
patch0008 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
patch0009 mailinfo: feed only one line to handle_filter() for QP input 2008-02-15 22:16:34 -08:00
patch0010 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0011 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0012 mailinfo: correctly handle multiline 'Subject:' header 2009-01-10 17:54:30 -08:00
patch0013 mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' 2009-01-28 15:12:24 -08:00
patch0014 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0014--scissors diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0015 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
patch0015--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
patch0016 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
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 mailinfo: do not concatenate charset= attribute values from mime headers 2012-09-17 15:24:52 -07:00
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 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0004 mailinfo: cleanup extra spaces for complex 'From:' 2009-02-01 12:11:15 -08:00
rfc2047-info-0005
rfc2047-info-0006 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0007 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0008 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0009 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0010 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0011 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
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