summaryrefslogtreecommitdiff
path: root/mailinfo.h
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2018-08-25 21:50:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-29 20:05:35 (GMT)
commit3aa4d81f88d2f09173e65eebe35a385b2a064c87 (patch)
tree2320c740c2b723593d1d871adda8a7b2f3cd75f3 /mailinfo.h
parent53f9a3e157dbbc901a02ac2c73346d375e24978c (diff)
downloadgit-3aa4d81f88d2f09173e65eebe35a385b2a064c87.zip
git-3aa4d81f88d2f09173e65eebe35a385b2a064c87.tar.gz
git-3aa4d81f88d2f09173e65eebe35a385b2a064c87.tar.bz2
mailinfo: support format=flowed
Add best-effort support for patches sent using format=flowed (RFC 3676). Remove leading spaces ("unstuff"), remove soft line breaks (indicated by space + newline), but leave the signature separator (dash dash space newline) alone. Warn in git am when encountering a format=flowed patch, because any trailing spaces would most probably be lost, as the sending MUA is encouraged to remove them when preparing the email. Provide a test patch formatted by Mozilla Thunderbird 60 using its default configuration. It reuses the contents of the file mailinfo.c before and after this patch. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.h')
-rw-r--r--mailinfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mailinfo.h b/mailinfo.h
index 04a2535..67af28d 100644
--- a/mailinfo.h
+++ b/mailinfo.h
@@ -20,6 +20,8 @@ struct mailinfo {
struct strbuf *content[MAX_BOUNDARIES];
struct strbuf **content_top;
struct strbuf charset;
+ unsigned int format_flowed:1;
+ unsigned int delsp:1;
char *message_id;
enum {
TE_DONTCARE, TE_QP, TE_BASE64