On 2021-04-19 21:50:52+0300, Tomi Ollila <tomi.ollila@iki.fi> wrote: > On Mon, Apr 19 2021, David Bremner wrote: > > > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > >> Hello. > >> > >> On Sat, Apr 17, 2021 at 7:20 AM David Bremner <david@tethera.net> wrote: > >> > >>> Thanks for the patch. I have a couple of questions / comments > >>> > >>> - It doesn't apply against current master (5248f55d5f1). Can you rebase > >>> it? > >> > >> Huh? That's precisely the commit I used as a base. It applies cleanly. > >> > > > > Ah right, you hit an annoying mailman bug related to encodings and line > > endings. I have unmangled the patch and applied it to master. > > ...which is not actually a bug, just features of git and mailman > that does not work together... > > IIRC what happens there: > > - smtp server receives message encoded as 8bit, possibly only LF > (line-feed 0x10) as line endings (I saw this when sent to myself > message routed back to me via smtp.iki.fi) > > - if only LF as line ending, something in pipeline changes that to CRLF > (carriage-return line-feed 0x13 0x10) (allowed according to specs) > > - now (if not before) mailman gets the message, notices it has 8bit > encoding, converts that message to have base64 encoding > > - mailman sends the email now base64-encoded to recipients > > - user saves message and runs git-am to the message > > - since content now has CRLF line endings and the content it is comparing > to has only NL, the content just does not match. git-am cannot know that > (w/o some magical heuristics) that the CRs are actually extra characters > should not be there (having CRLF may be as relevant as only LF) > > In another machine I still have David's email to mailman in one firefox > tab; I recall trying to write something there to explain why mailman > is buggy there, but eventually could not be convincing enough ;/) > > git-am could have an option to strip CR's from messages just to overcome > the possibility shown above FWIW, I've sent a couple of patches to Git project. git-am and git-mailinfo 2.32-rc0+ [1] now understands --quoted-cr to strip those annoying CR. [1]: https://lore.kernel.org/git/xmqqh7j13kmc.fsf@gitster.g/T/#u -- Danh _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org