summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-mailinfo.c1
-rw-r--r--t/t5100/sample.mbox5
2 files changed, 5 insertions, 1 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index fcb32c9818..dacc8ac2d0 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 94da4daa1a..38725f38d2 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 <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.