From: Kirill Smelkov Date: Mon, 12 Jan 2009 23:22:11 +0000 (-0800) Subject: mailinfo: 'From:' header should be unfold as well X-Git-Tag: v1.6.2-rc0~41^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ddfb3696b91e2a2261b79d0828a7a715e3d71c1e;p=git.git mailinfo: 'From:' header should be unfold as well At present we do headers unfolding (see RFC822 3.1.1. LONG HEADER FIELDS) for all fields except 'From' (always) and 'Subject' (when keep_subject is set) Not unfolding 'From' is a bug -- see above-mentioned RFC link. Signed-off-by: Kirill Smelkov Signed-off-by: Junio C Hamano --- diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index fcb32c981..dacc8ac2d 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -871,6 +871,7 @@ static void handle_info(void) } output_header_lines(fout, "Subject", hdr); } else if (!memcmp(header[i], "From", 4)) { + cleanup_space(hdr); handle_from(hdr); fprintf(fout, "Author: %s\n", name.buf); fprintf(fout, "Email: %s\n", email.buf); diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox index 94da4daa1..38725f38d 100644 --- a/t/t5100/sample.mbox +++ b/t/t5100/sample.mbox @@ -2,7 +2,10 @@ From nobody Mon Sep 17 00:00:00 2001 -From: A U Thor +From: A + U + Thor + Date: Fri, 9 Jun 2006 00:44:16 -0700 Subject: [PATCH] a commit.