public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Public-Service-Announcement: send-email issues with Git 2.22.0+
@ 2019-12-04  4:31 Nate DeSimone
  2019-12-04  5:04 ` Liming Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nate DeSimone @ 2019-12-04  4:31 UTC (permalink / raw)
  To: devel@edk2.groups.io

Hi Everyone,

I have been dealing with a very frustrating issue recently where all of my "CR LF" line endings get erroneously converted into "LF LF" once I send my patch to the mailing list. I have discovered the root cause for this problem. The issue is the following commit to git itself:

https://github.com/git/git/commit/5983ddc165221c3ec2a4299b65cfb2ecc1ce7765

This change is present in git version 2.20.0 or later, per the release notes:

https://github.com/git/git/blob/v2.22.0/Documentation/RelNotes/2.22.0.txt

With this change, if you leave sendemail.transferEncoding set to the default value of "auto", then git will inspect the body of your email. If it finds a '\r' character in the message, then it converts the entire message content into Quoted-Printable encoding. It appears that when groups.io converts the QP encoding back to text format, the '\r' characters somehow become '\n'. To workaround this make sure to set the following configuration option:

git config --global sendemail.transferEncoding 8bit

This will prevent send-email from converting the message into QP encoding, allowing the patches to pass through to the mailing list unharmed. Hope that saves other people a few hours of frustration.

Regards,
Nate

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Public-Service-Announcement: send-email issues with Git 2.22.0+
  2019-12-04  4:31 Public-Service-Announcement: send-email issues with Git 2.22.0+ Nate DeSimone
@ 2019-12-04  5:04 ` Liming Gao
  2019-12-04  9:32 ` [edk2-devel] " Laszlo Ersek
  2019-12-04 12:13 ` Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Liming Gao @ 2019-12-04  5:04 UTC (permalink / raw)
  To: devel@edk2.groups.io, Desimone, Nathaniel L

Nate:
  Thanks for your sharing. I apply this command in my development machine. 

Thanks
Liming
>-----Original Message-----
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Nate DeSimone
>Sent: Wednesday, December 04, 2019 12:31 PM
>To: devel@edk2.groups.io
>Subject: [edk2-devel] Public-Service-Announcement: send-email issues with
>Git 2.22.0+
>Importance: High
>
>Hi Everyone,
>
>I have been dealing with a very frustrating issue recently where all of my "CR
>LF" line endings get erroneously converted into "LF LF" once I send my patch
>to the mailing list. I have discovered the root cause for this problem. The issue
>is the following commit to git itself:
>
>https://github.com/git/git/commit/5983ddc165221c3ec2a4299b65cfb2ecc1ce7
>765
>
>This change is present in git version 2.20.0 or later, per the release notes:
>
>https://github.com/git/git/blob/v2.22.0/Documentation/RelNotes/2.22.0.txt
>
>With this change, if you leave sendemail.transferEncoding set to the default
>value of "auto", then git will inspect the body of your email. If it finds a '\r'
>character in the message, then it converts the entire message content into
>Quoted-Printable encoding. It appears that when groups.io converts the QP
>encoding back to text format, the '\r' characters somehow become '\n'. To
>workaround this make sure to set the following configuration option:
>
>git config --global sendemail.transferEncoding 8bit
>
>This will prevent send-email from converting the message into QP encoding,
>allowing the patches to pass through to the mailing list unharmed. Hope that
>saves other people a few hours of frustration.
>
>Regards,
>Nate
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Public-Service-Announcement: send-email issues with Git 2.22.0+
  2019-12-04  4:31 Public-Service-Announcement: send-email issues with Git 2.22.0+ Nate DeSimone
  2019-12-04  5:04 ` Liming Gao
@ 2019-12-04  9:32 ` Laszlo Ersek
  2019-12-04 12:13 ` Leif Lindholm
  2 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2019-12-04  9:32 UTC (permalink / raw)
  To: devel, nathaniel.l.desimone

On 12/04/19 05:31, Nate DeSimone wrote:
> Hi Everyone,
> 
> I have been dealing with a very frustrating issue recently where all of my "CR LF" line endings get erroneously converted into "LF LF" once I send my patch to the mailing list. I have discovered the root cause for this problem. The issue is the following commit to git itself:
> 
> https://github.com/git/git/commit/5983ddc165221c3ec2a4299b65cfb2ecc1ce7765
> 
> This change is present in git version 2.20.0 or later, per the release notes:
> 
> https://github.com/git/git/blob/v2.22.0/Documentation/RelNotes/2.22.0.txt
> 
> With this change, if you leave sendemail.transferEncoding set to the default value of "auto", then git will inspect the body of your email. If it finds a '\r' character in the message, then it converts the entire message content into Quoted-Printable encoding. It appears that when groups.io converts the QP encoding back to text format, the '\r' characters somehow become '\n'. To workaround this make sure to set the following configuration option:
> 
> git config --global sendemail.transferEncoding 8bit
> 
> This will prevent send-email from converting the message into QP encoding, allowing the patches to pass through to the mailing list unharmed. Hope that saves other people a few hours of frustration.

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Public-Service-Announcement: send-email issues with Git 2.22.0+
  2019-12-04  4:31 Public-Service-Announcement: send-email issues with Git 2.22.0+ Nate DeSimone
  2019-12-04  5:04 ` Liming Gao
  2019-12-04  9:32 ` [edk2-devel] " Laszlo Ersek
@ 2019-12-04 12:13 ` Leif Lindholm
  2019-12-06 18:17   ` Nate DeSimone
  2 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2019-12-04 12:13 UTC (permalink / raw)
  To: devel, nathaniel.l.desimone

Hi Nate,

On Wed, Dec 04, 2019 at 04:31:04 +0000, Nate DeSimone wrote:
> I have been dealing with a very frustrating issue recently where all
> of my "CR LF" line endings get erroneously converted into "LF LF"
> once I send my patch to the mailing list. I have discovered the root
> cause for this problem. The issue is the following commit to git
> itself:
> 
> https://github.com/git/git/commit/5983ddc165221c3ec2a4299b65cfb2ecc1ce7765
> 
> This change is present in git version 2.20.0 or later, per the release notes:
> 
> https://github.com/git/git/blob/v2.22.0/Documentation/RelNotes/2.22.0.txt
> 
> With this change, if you leave sendemail.transferEncoding set to the
> default value of "auto", then git will inspect the body of your
> email. If it finds a '\r' character in the message, then it converts
> the entire message content into Quoted-Printable encoding. It
> appears that when groups.io converts the QP encoding back to text
> format, the '\r' characters somehow become '\n'. To workaround this
> make sure to set the following configuration option:
> 
> git config --global sendemail.transferEncoding 8bit

Thanks for this investigation.

Just one warning to readers - while convenient, --global may not be
the correct course of action for all developers.

> This will prevent send-email from converting the message into QP
> encoding, allowing the patches to pass through to the mailing list
> unharmed. Hope that saves other people a few hours of frustration.

Could you possibly submit a patch adding this setting to this table
https://github.com/tianocore/edk2/blob/master/BaseTools/Scripts/SetupGit.py#L54
such that it gets set automatically by that script?
This way it's conveniently configured per-tree with the other known
good default settings.

I got curious and looked into what the git documentation says about
this option.

For 2.9.1 (the first search hit, July 2016) it says:
"Default is the value of the sendemail.transferEncoding configuration
value; if that is unspecified, git will use 8bit and not add a
Content-Transfer-Encoding header."

For 2.24.0 (the current release, November 2019) it says:
"Default is the value of the sendemail.transferEncoding configuration
value; if that is unspecified, default to auto."

So a user of old git versions might not even have tripped over
this...

Best Regards,

Leif

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Public-Service-Announcement: send-email issues with Git 2.22.0+
  2019-12-04 12:13 ` Leif Lindholm
@ 2019-12-06 18:17   ` Nate DeSimone
  0 siblings, 0 replies; 5+ messages in thread
From: Nate DeSimone @ 2019-12-06 18:17 UTC (permalink / raw)
  To: Leif Lindholm, devel@edk2.groups.io

Hi Leif,

On 12/4/2019 4:13 AM, Leif Lindholm wrote:
> Hi Nate,
>
> On Wed, Dec 04, 2019 at 04:31:04 +0000, Nate DeSimone wrote:
>> I have been dealing with a very frustrating issue recently where all
>> of my "CR LF" line endings get erroneously converted into "LF LF"
>> once I send my patch to the mailing list. I have discovered the root
>> cause for this problem. The issue is the following commit to git
>> itself:
>>
>> https://github.com/git/git/commit/5983ddc165221c3ec2a4299b65cfb2ecc1ce7765
>>
>> This change is present in git version 2.20.0 or later, per the release notes:
>>
>> https://github.com/git/git/blob/v2.22.0/Documentation/RelNotes/2.22.0.txt
>>
>> With this change, if you leave sendemail.transferEncoding set to the
>> default value of "auto", then git will inspect the body of your
>> email. If it finds a '\r' character in the message, then it converts
>> the entire message content into Quoted-Printable encoding. It
>> appears that when groups.io converts the QP encoding back to text
>> format, the '\r' characters somehow become '\n'. To workaround this
>> make sure to set the following configuration option:
>>
>> git config --global sendemail.transferEncoding 8bit
> Thanks for this investigation.
>
> Just one warning to readers - while convenient, --global may not be
> the correct course of action for all developers.
>
>> This will prevent send-email from converting the message into QP
>> encoding, allowing the patches to pass through to the mailing list
>> unharmed. Hope that saves other people a few hours of frustration.
> Could you possibly submit a patch adding this setting to this table
> https://github.com/tianocore/edk2/blob/master/BaseTools/Scripts/SetupGit.py#L54
> such that it gets set automatically by that script?
> This way it's conveniently configured per-tree with the other known
> good default settings.


I have submitted the patch per your request:


https://edk2.groups.io/g/devel/message/52014


>
> I got curious and looked into what the git documentation says about
> this option.
>
> For 2.9.1 (the first search hit, July 2016) it says:
> "Default is the value of the sendemail.transferEncoding configuration
> value; if that is unspecified, git will use 8bit and not add a
> Content-Transfer-Encoding header."
>
> For 2.24.0 (the current release, November 2019) it says:
> "Default is the value of the sendemail.transferEncoding configuration
> value; if that is unspecified, default to auto."
>
> So a user of old git versions might not even have tripped over
> this...
>
> Best Regards,
>
> Leif

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-06 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04  4:31 Public-Service-Announcement: send-email issues with Git 2.22.0+ Nate DeSimone
2019-12-04  5:04 ` Liming Gao
2019-12-04  9:32 ` [edk2-devel] " Laszlo Ersek
2019-12-04 12:13 ` Leif Lindholm
2019-12-06 18:17   ` Nate DeSimone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox