summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 353aaf2)
raw | patch | inline | side by side (parent: 353aaf2)
author | Kirill Smelkov <kirr@landau.phys.spbu.ru> | |
Mon, 12 Jan 2009 23:22:11 +0000 (15:22 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Jan 2009 23:22:11 +0000 (15:22 -0800) |
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>
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>
builtin-mailinfo.c | patch | blob | history | |
t/t5100/sample.mbox | patch | blob | history |
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index fcb32c9818e6c8ce5fef612192b971a4ec2d99dd..dacc8ac2d0e63e46dd1aa8fee6ba949bdd319e43 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
}
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 94da4daa1a12a19f0a850ce845042c5ce953646b..38725f38d2ab1dca07efb12b587fb0bf8a2cf16b 100644 (file)
--- a/t/t5100/sample.mbox
+++ b/t/t5100/sample.mbox
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.