aboutsummaryrefslogtreecommitdiff
path: root/builtin-mailinfo.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-07-27 17:03:43 +0300
committerJunio C Hamano <junkio@cox.net>2006-07-27 19:33:06 -0700
commitc2c487cf3a6c37bc9b4e3f0e10ad08d9ce048404 (patch)
treeb5e553f77ff8cc198757e3edd5eea167cbea7f38 /builtin-mailinfo.c
parentcc41cd2e60da8224dcd04f23d837853cff5d4eda (diff)
downloadgit-c2c487cf3a6c37bc9b4e3f0e10ad08d9ce048404.tar.gz
git-c2c487cf3a6c37bc9b4e3f0e10ad08d9ce048404.tar.xz
mailinfo: accept >From in message header
Mail I get sometimes has multiple From lines, like this: From Majordomo@vger.kernel.org Thu Jul 27 16:39:36 2006 >From mtsirkin Thu Jul 27 16:39:36 2006 Received: from yok.mtl.com [10.0.8.11] ... which confuses git-mailinfo since that does not recognize >From as a valid header line. This patch makes it recognize >From XXX as a valid header line. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-mailinfo.c')
-rw-r--r--builtin-mailinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index ac53f76f6..05dc1bfe7 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -446,7 +446,7 @@ static int read_one_header_line(char *line, int sz, FILE *in)
break;
}
/* Count mbox From headers as headers */
- if (!ofs && !memcmp(line, "From ", 5))
+ if (!ofs && (!memcmp(line, "From ", 5) || !memcmp(line, ">From ", 6)))
ofs = 1;
return ofs;
}