From: Junio C Hamano Date: Mon, 12 Jan 2009 23:27:44 GMT Subject: Re: [BUG PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header Message-ID: <7v63kkgl5b.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20090112223447.GA5948@roro3.zxlink> Kirill Smelkov writes: > diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c > index f7c8c08..6d72c1b 100644 > --- a/builtin-mailinfo.c > +++ b/builtin-mailinfo.c > @@ -860,6 +860,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 4bf7947..d465685 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. I think this is a reasonable change. But doesn't this > From nobody Mon Sep 17 00:00:00 2001 > -From: A > +From: A (zzz) > U > Thor > - > + (Comment) regress for people who spell their names like this? From: john.doe@email.xz (John Doe)