Re: [PATCH] mailinfo: strip CR from base64/quoted-printable email
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2021, 02:09 UTC
- Message-ID
- <xmqqy2dcz8ve.fsf@gitster.g>
- In-Reply-To
- <20210421013404.17383-1-congdanhqx@gmail.com>
Đoàn Trần Công Danh <congdanhqx@gmail.com> writes:
Show 6 quoted lines
> When an SMTP server receives an 8-bit email message, possibly with only > LF as line ending, some of those servers decide to change said LF to > CRLF. > > Some other SMTP servers, when receives an 8-bit email message, decide to > encoding such message in base64 and/or quoted-printable instead.
encoding -> encode
Show 17 quoted lines
> > If an email is transfered through those 2 email servers in order, the > final recipients will receive an email contains a patch mungled with > CRLF encoded inside another encoding. Thus, such CR couldn't be dropped > by mailsplit. Such accidents have been observed in the wild [1]. > > Let's guess if such CR was added automatically and strip them in > mailinfo. > > [1]: https://nmbug.notmuchmail.org/nmweb/show/m2lf9ejegj.fsf%40guru.guru-group.fi > > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> > --- > > I'm not sure if guessing the heuristic to strip CR is a good approach. > I think it's better to pass --keep-cr down from git-am. > Let's say --keep-cr=<yes|no|auto>
It matches my instinct to tie this with the existing --keep-cr option, even though I admit that I haven't thought things through.
.