Skip to content

Commit

Permalink
mailinfo: accept >From in message header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael S. Tsirkin authored and Junio C Hamano committed Jul 28, 2006
1 parent cc41cd2 commit c2c487c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c2c487c

Please sign in to comment.