diff options
author | Đoàn Trần Công Danh <congdanhqx@gmail.com> | 2021-05-09 19:12:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-10 08:06:22 +0200 |
commit | f1aa29944320e51441e5b5e32591e69f2fa74de2 (patch) | |
tree | e91b0c0cc616a2f3d3c82f8595d2c2bf05b2f536 /mailinfo.h | |
parent | mailinfo: warn if CRLF found in decoded base64/QP email (diff) | |
download | git-f1aa29944320e51441e5b5e32591e69f2fa74de2.tar.xz git-f1aa29944320e51441e5b5e32591e69f2fa74de2.zip |
mailinfo: allow squelching quoted CRLF warning
In previous change, Git starts to warn for quoted CRLF in decoded
base64/QP email. Despite those warnings are usually helpful,
quoted CRLF could be part of some users' workflow.
Let's give them an option to turn off the warning completely.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.h')
-rw-r--r-- | mailinfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mailinfo.h b/mailinfo.h index b394ef9bce..768d06ac2a 100644 --- a/mailinfo.h +++ b/mailinfo.h @@ -5,6 +5,11 @@ #define MAX_BOUNDARIES 5 +enum quoted_cr_action { + quoted_cr_nowarn, + quoted_cr_warn, +}; + struct mailinfo { FILE *input; FILE *output; @@ -14,6 +19,7 @@ struct mailinfo { struct strbuf email; int keep_subject; int keep_non_patch_brackets_in_subject; + int quoted_cr; /* enum quoted_cr_action */ int add_message_id; int use_scissors; int use_inbody_headers; @@ -40,6 +46,7 @@ struct mailinfo { int input_error; }; +int mailinfo_parse_quoted_cr_action(const char *actionstr, int *action); void setup_mailinfo(struct mailinfo *); int mailinfo(struct mailinfo *, const char *msg, const char *patch); void clear_mailinfo(struct mailinfo *); |