unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Tomi Ollila <tomi.ollila@iki.fi>
Cc: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: [PATCH] ruby: fix ruby 3.1 warnings
Date: Mon, 17 May 2021 18:54:39 +0700	[thread overview]
Message-ID: <YKJZfyeiVWOwSuB3@danh.dev> (raw)
In-Reply-To: <m2lf9ejegj.fsf@guru.guru-group.fi>

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

  parent reply	other threads:[~2021-05-17 11:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 20:27 [PATCH] ruby: fix ruby 3.1 warnings Felipe Contreras
2021-04-17 12:20 ` David Bremner
2021-04-18 22:54   ` Felipe Contreras
2021-04-19 10:14     ` David Bremner
2021-04-19 18:50       ` Tomi Ollila
2021-04-19 20:35         ` Felipe Contreras
2021-05-17 11:54         ` Đoàn Trần Công Danh [this message]
2021-05-17 19:14           ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKJZfyeiVWOwSuB3@danh.dev \
    --to=congdanhqx@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).