unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: [PATCH] ruby: fix ruby 3.1 warnings
Date: Mon, 19 Apr 2021 21:50:52 +0300	[thread overview]
Message-ID: <m2lf9ejegj.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87k0oy60oe.fsf@tethera.net>

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 

(otoh?) latest git-send-email has this option: --8bit-encoding
-- and if not given (and not in git config), according to namual page,
will prompt for an encoding (IIRC I've seen this w/ git 2.30)

HTH :D

Tomi

  reply	other threads:[~2021-04-19 18:51 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 [this message]
2021-04-19 20:35         ` Felipe Contreras
2021-05-17 11:54         ` Đoàn Trần Công Danh
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=m2lf9ejegj.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=felipe.contreras@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /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).