Skip to content

Commit

Permalink
mailinfo: 'From:' header should be unfold as well
Browse files Browse the repository at this point in the history
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 <kirr@landau.phys.spbu.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Kirill Smelkov authored and Junio C Hamano committed Jan 12, 2009
1 parent 353aaf2 commit ddfb369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions builtin-mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion t/t5100/sample.mbox
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@


From nobody Mon Sep 17 00:00:00 2001
From: A U Thor <a.u.thor@example.com>
From: A
U
Thor
<a.u.thor@example.com>
Date: Fri, 9 Jun 2006 00:44:16 -0700
Subject: [PATCH] a commit.

Expand Down

0 comments on commit ddfb369

Please sign in to comment.