public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
       [not found] <15DDDAE6FE3C410D.8264@groups.io>
@ 2019-12-18  3:01 ` Nate DeSimone
  2019-12-18  6:08   ` Bob Feng
  2019-12-18 18:11   ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 5+ messages in thread
From: Nate DeSimone @ 2019-12-18  3:01 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Feng, Bob C, Gao, Liming, Leif Lindholm

Any chance I could get a code review on this?

Thanks,
Nate

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Friday, December 6, 2019 10:15 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py

If git 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, the SetupGit.py script will now explicitly set the sendemail.transferEncoding git config option to '8bit'

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py index 3d39d3b35f..514f1c4d42 100644
--- a/BaseTools/Scripts/SetupGit.py
+++ b/BaseTools/Scripts/SetupGit.py
@@ -2,6 +2,7 @@
 #  Set up the git configuration for contributing to TianoCore projects  #  #  Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR>
+#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -53,29 +54,30 @@ MIN_GIT_VERSION = (1, 9, 0)
 
 # Set of options to be set identically for all repositories  OPTIONS = [
-    {'section': 'am',          'option': 'keepcr',         'value': True},
-    {'section': 'am',          'option': 'signoff',        'value': True},
-    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},
-    {'section': 'color',       'option': 'diff',           'value': True},
-    {'section': 'color',       'option': 'grep',           'value': 'auto'},
-    {'section': 'commit',      'option': 'signoff',        'value': True},
-    {'section': 'core',        'option': 'abbrev',         'value': 12},
+    {'section': 'am',          'option': 'keepcr',            'value': True},
+    {'section': 'am',          'option': 'signoff',           'value': True},
+    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},
+    {'section': 'color',       'option': 'diff',              'value': True},
+    {'section': 'color',       'option': 'grep',              'value': 'auto'},
+    {'section': 'commit',      'option': 'signoff',           'value': True},
+    {'section': 'core',        'option': 'abbrev',            'value': 12},
     {'section': 'core',        'option': 'attributesFile',
      'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},
-    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},
-    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},
+    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},
+    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},
     {'section': 'diff',        'option': 'orderFile',
      'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},
-    {'section': 'diff',        'option': 'renames',        'value': 'copies'},
-    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},
-    {'section': 'diff "ini"',    'option': 'xfuncname',
+    {'section': 'diff',        'option': 'renames',           'value': 'copies'},
+    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},
+    {'section': 'diff "ini"',  'option': 'xfuncname',
      'value': '^\\\\[[A-Za-z0-9_., ]+]'},
-    {'section': 'format',      'option': 'coverLetter',    'value': True},
-    {'section': 'format',      'option': 'numbered',       'value': True},
-    {'section': 'format',      'option': 'signoff',        'value': False},
-    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},
-    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},
-    {'section': 'sendemail',   'option': 'thread',         'value': True},
+    {'section': 'format',      'option': 'coverLetter',       'value': True},
+    {'section': 'format',      'option': 'numbered',          'value': True},
+    {'section': 'format',      'option': 'signoff',           'value': False},
+    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},
+    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},
+    {'section': 'sendemail',   'option': 'thread',            'value': True},
+    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},
     ]
 
 
--
2.24.0.windows.2





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

* Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
  2019-12-18  3:01 ` [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py Nate DeSimone
@ 2019-12-18  6:08   ` Bob Feng
  2019-12-18 18:11   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 5+ messages in thread
From: Bob Feng @ 2019-12-18  6:08 UTC (permalink / raw)
  To: Desimone, Nathaniel L, devel@edk2.groups.io; +Cc: Gao, Liming, Leif Lindholm

Hi Nate,

This patch is good to me.

Reviewed-by: Bob Feng <bob.c.feng@intel.com>


Thanks,
Bob

-----Original Message-----
From: Desimone, Nathaniel L 
Sent: Wednesday, December 18, 2019 11:01 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: RE: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py

Any chance I could get a code review on this?

Thanks,
Nate

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Friday, December 6, 2019 10:15 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py

If git 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, the SetupGit.py script will now explicitly set the sendemail.transferEncoding git config option to '8bit'

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py index 3d39d3b35f..514f1c4d42 100644
--- a/BaseTools/Scripts/SetupGit.py
+++ b/BaseTools/Scripts/SetupGit.py
@@ -2,6 +2,7 @@
 #  Set up the git configuration for contributing to TianoCore projects  #  #  Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR>
+#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -53,29 +54,30 @@ MIN_GIT_VERSION = (1, 9, 0)
 
 # Set of options to be set identically for all repositories  OPTIONS = [
-    {'section': 'am',          'option': 'keepcr',         'value': True},
-    {'section': 'am',          'option': 'signoff',        'value': True},
-    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},
-    {'section': 'color',       'option': 'diff',           'value': True},
-    {'section': 'color',       'option': 'grep',           'value': 'auto'},
-    {'section': 'commit',      'option': 'signoff',        'value': True},
-    {'section': 'core',        'option': 'abbrev',         'value': 12},
+    {'section': 'am',          'option': 'keepcr',            'value': True},
+    {'section': 'am',          'option': 'signoff',           'value': True},
+    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},
+    {'section': 'color',       'option': 'diff',              'value': True},
+    {'section': 'color',       'option': 'grep',              'value': 'auto'},
+    {'section': 'commit',      'option': 'signoff',           'value': True},
+    {'section': 'core',        'option': 'abbrev',            'value': 12},
     {'section': 'core',        'option': 'attributesFile',
      'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},
-    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},
-    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},
+    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},
+    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},
     {'section': 'diff',        'option': 'orderFile',
      'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},
-    {'section': 'diff',        'option': 'renames',        'value': 'copies'},
-    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},
-    {'section': 'diff "ini"',    'option': 'xfuncname',
+    {'section': 'diff',        'option': 'renames',           'value': 'copies'},
+    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},
+    {'section': 'diff "ini"',  'option': 'xfuncname',
      'value': '^\\\\[[A-Za-z0-9_., ]+]'},
-    {'section': 'format',      'option': 'coverLetter',    'value': True},
-    {'section': 'format',      'option': 'numbered',       'value': True},
-    {'section': 'format',      'option': 'signoff',        'value': False},
-    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},
-    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},
-    {'section': 'sendemail',   'option': 'thread',         'value': True},
+    {'section': 'format',      'option': 'coverLetter',       'value': True},
+    {'section': 'format',      'option': 'numbered',          'value': True},
+    {'section': 'format',      'option': 'signoff',           'value': False},
+    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},
+    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},
+    {'section': 'sendemail',   'option': 'thread',            'value': True},
+    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},
     ]
 
 
--
2.24.0.windows.2





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

* Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
  2019-12-18  3:01 ` [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py Nate DeSimone
  2019-12-18  6:08   ` Bob Feng
@ 2019-12-18 18:11   ` Philippe Mathieu-Daudé
  2019-12-20  7:39     ` Bob Feng
  2020-01-02 16:52     ` Nate DeSimone
  1 sibling, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-18 18:11 UTC (permalink / raw)
  To: devel, nathaniel.l.desimone; +Cc: Feng, Bob C, Gao, Liming, Leif Lindholm

Hi Nate,

On 12/18/19 4:01 AM, Nate DeSimone wrote:
> Any chance I could get a code review on this?
> 
> Thanks,
> Nate
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
> Sent: Friday, December 6, 2019 10:15 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
> Subject: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
> 
> If git 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, the SetupGit.py script will now explicitly set the sendemail.transferEncoding git config option to '8bit'
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>   BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------
>   1 file changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py index 3d39d3b35f..514f1c4d42 100644
> --- a/BaseTools/Scripts/SetupGit.py
> +++ b/BaseTools/Scripts/SetupGit.py
> @@ -2,6 +2,7 @@
>   #  Set up the git configuration for contributing to TianoCore projects  #  #  Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR>
> +#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
>   #
>   #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -53,29 +54,30 @@ MIN_GIT_VERSION = (1, 9, 0)
>   
>   # Set of options to be set identically for all repositories  OPTIONS = [
> -    {'section': 'am',          'option': 'keepcr',         'value': True},
> -    {'section': 'am',          'option': 'signoff',        'value': True},
> -    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},
> -    {'section': 'color',       'option': 'diff',           'value': True},
> -    {'section': 'color',       'option': 'grep',           'value': 'auto'},
> -    {'section': 'commit',      'option': 'signoff',        'value': True},
> -    {'section': 'core',        'option': 'abbrev',         'value': 12},
> +    {'section': 'am',          'option': 'keepcr',            'value': True},
> +    {'section': 'am',          'option': 'signoff',           'value': True},
> +    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},
> +    {'section': 'color',       'option': 'diff',              'value': True},
> +    {'section': 'color',       'option': 'grep',              'value': 'auto'},
> +    {'section': 'commit',      'option': 'signoff',           'value': True},
> +    {'section': 'core',        'option': 'abbrev',            'value': 12},
>       {'section': 'core',        'option': 'attributesFile',
>        'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},
> -    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},
> -    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},
> +    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},
> +    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},
>       {'section': 'diff',        'option': 'orderFile',
>        'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},
> -    {'section': 'diff',        'option': 'renames',        'value': 'copies'},
> -    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},
> -    {'section': 'diff "ini"',    'option': 'xfuncname',
> +    {'section': 'diff',        'option': 'renames',           'value': 'copies'},
> +    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},
> +    {'section': 'diff "ini"',  'option': 'xfuncname',
>        'value': '^\\\\[[A-Za-z0-9_., ]+]'},
> -    {'section': 'format',      'option': 'coverLetter',    'value': True},
> -    {'section': 'format',      'option': 'numbered',       'value': True},
> -    {'section': 'format',      'option': 'signoff',        'value': False},
> -    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},
> -    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},
> -    {'section': 'sendemail',   'option': 'thread',         'value': True},
> +    {'section': 'format',      'option': 'coverLetter',       'value': True},
> +    {'section': 'format',      'option': 'numbered',          'value': True},
> +    {'section': 'format',      'option': 'signoff',           'value': False},
> +    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},
> +    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},
> +    {'section': 'sendemail',   'option': 'thread',            'value': True},
> +    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},

Unfortunately I never received the original patch.
I downloaded it from 
https://www.redhat.com/archives/edk2-devel-archive/2019-December/msg00720.html 
but I get an error when applying:

**** malformed patch at line 12: -    {'section': 'am', 
'option': 'signoff',        'value': True},

Due to space/tab? changes, your patch is very hard to review (I wanted 
to look at it with 'git-diff --word-diff=color'. If I missed anything, 
you simply added:

+    {'section': 'sendemail',   'option': 'transferEncoding',  'value': 
'8bit'},

Is that right?

>       ]
>   
>   
> --
> 2.24.0.windows.2
> 
> 
> 
> 
> 
> 
> 


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

* Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
  2019-12-18 18:11   ` Philippe Mathieu-Daudé
@ 2019-12-20  7:39     ` Bob Feng
  2020-01-02 16:52     ` Nate DeSimone
  1 sibling, 0 replies; 5+ messages in thread
From: Bob Feng @ 2019-12-20  7:39 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, devel@edk2.groups.io,
	Desimone, Nathaniel L
  Cc: Gao, Liming, Leif Lindholm

Hi Phil,

What I saw the working  part of this path is one line,  {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'}, other changes are just to adjust alignment.

Thanks,
Bob

-----Original Message-----
From: Philippe Mathieu-Daudé [mailto:philmd@redhat.com] 
Sent: Thursday, December 19, 2019 2:11 AM
To: devel@edk2.groups.io; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py

Hi Nate,

On 12/18/19 4:01 AM, Nate DeSimone wrote:
> Any chance I could get a code review on this?
> 
> Thanks,
> Nate
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate 
> DeSimone
> Sent: Friday, December 6, 2019 10:15 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming 
> <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
> Subject: [edk2-devel] [PATCH] BaseTools/Scripts: Add 
> sendemail.transferEncoding to SetupGit.py
> 
> If git 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, the SetupGit.py script will now explicitly set the sendemail.transferEncoding git config option to '8bit'
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>   BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------
>   1 file changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/BaseTools/Scripts/SetupGit.py 
> b/BaseTools/Scripts/SetupGit.py index 3d39d3b35f..514f1c4d42 100644
> --- a/BaseTools/Scripts/SetupGit.py
> +++ b/BaseTools/Scripts/SetupGit.py
> @@ -2,6 +2,7 @@
>   #  Set up the git configuration for contributing to TianoCore 
> projects  #  #  Copyright (c) 2019, Linaro Ltd. All rights 
> reserved.<BR>
> +#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
>   #
>   #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -53,29 +54,30 
> @@ MIN_GIT_VERSION = (1, 9, 0)
>   
>   # Set of options to be set identically for all repositories  OPTIONS = [
> -    {'section': 'am',          'option': 'keepcr',         'value': True},
> -    {'section': 'am',          'option': 'signoff',        'value': True},
> -    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},
> -    {'section': 'color',       'option': 'diff',           'value': True},
> -    {'section': 'color',       'option': 'grep',           'value': 'auto'},
> -    {'section': 'commit',      'option': 'signoff',        'value': True},
> -    {'section': 'core',        'option': 'abbrev',         'value': 12},
> +    {'section': 'am',          'option': 'keepcr',            'value': True},
> +    {'section': 'am',          'option': 'signoff',           'value': True},
> +    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},
> +    {'section': 'color',       'option': 'diff',              'value': True},
> +    {'section': 'color',       'option': 'grep',              'value': 'auto'},
> +    {'section': 'commit',      'option': 'signoff',           'value': True},
> +    {'section': 'core',        'option': 'abbrev',            'value': 12},
>       {'section': 'core',        'option': 'attributesFile',
>        'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},
> -    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},
> -    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},
> +    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},
> +    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},
>       {'section': 'diff',        'option': 'orderFile',
>        'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},
> -    {'section': 'diff',        'option': 'renames',        'value': 'copies'},
> -    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},
> -    {'section': 'diff "ini"',    'option': 'xfuncname',
> +    {'section': 'diff',        'option': 'renames',           'value': 'copies'},
> +    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},
> +    {'section': 'diff "ini"',  'option': 'xfuncname',
>        'value': '^\\\\[[A-Za-z0-9_., ]+]'},
> -    {'section': 'format',      'option': 'coverLetter',    'value': True},
> -    {'section': 'format',      'option': 'numbered',       'value': True},
> -    {'section': 'format',      'option': 'signoff',        'value': False},
> -    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},
> -    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},
> -    {'section': 'sendemail',   'option': 'thread',         'value': True},
> +    {'section': 'format',      'option': 'coverLetter',       'value': True},
> +    {'section': 'format',      'option': 'numbered',          'value': True},
> +    {'section': 'format',      'option': 'signoff',           'value': False},
> +    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},
> +    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},
> +    {'section': 'sendemail',   'option': 'thread',            'value': True},
> +    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},

Unfortunately I never received the original patch.
I downloaded it from
https://www.redhat.com/archives/edk2-devel-archive/2019-December/msg00720.html
but I get an error when applying:

**** malformed patch at line 12: -    {'section': 'am', 
'option': 'signoff',        'value': True},

Due to space/tab? changes, your patch is very hard to review (I wanted to look at it with 'git-diff --word-diff=color'. If I missed anything, you simply added:

+    {'section': 'sendemail',   'option': 'transferEncoding',  'value': 
'8bit'},

Is that right?

>       ]
>   
>   
> --
> 2.24.0.windows.2
> 
> 
> 
> 
> 
> 
> 


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

* Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
  2019-12-18 18:11   ` Philippe Mathieu-Daudé
  2019-12-20  7:39     ` Bob Feng
@ 2020-01-02 16:52     ` Nate DeSimone
  1 sibling, 0 replies; 5+ messages in thread
From: Nate DeSimone @ 2020-01-02 16:52 UTC (permalink / raw)
  To: devel@edk2.groups.io, philmd@redhat.com
  Cc: Feng, Bob C, Gao, Liming, Leif Lindholm


[-- Attachment #1.1.1: Type: text/plain, Size: 7376 bytes --]

Hi Philippe,



I usually try to avoid HTML emails, but the Beyond Compare view makes much more sense:



[cid:image001.png@01D5C149.776AF7D0]



TL:DR, yes you are right. The only change of substance is {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'}, the rest is just fixing columns to align like they did before my change.



I was able to apply my own patch as transmitted by groups.io. For your convenience, I have also attached my patch to this email.



Thanks,

Nate



-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Philippe Mathieu-Daudé
Sent: Wednesday, December 18, 2019 10:11 AM
To: devel@edk2.groups.io; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py



Hi Nate,



On 12/18/19 4:01 AM, Nate DeSimone wrote:

> Any chance I could get a code review on this?

>

> Thanks,

> Nate

>

> -----Original Message-----

> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Nate

> DeSimone

> Sent: Friday, December 6, 2019 10:15 AM

> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>

> Cc: Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>>; Gao, Liming

> <liming.gao@intel.com<mailto:liming.gao@intel.com>>; Leif Lindholm <leif.lindholm@linaro.org<mailto:leif.lindholm@linaro.org>>

> Subject: [edk2-devel] [PATCH] BaseTools/Scripts: Add

> sendemail.transferEncoding to SetupGit.py

>

> If git 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, the SetupGit.py script will now explicitly set the sendemail.transferEncoding git config option to '8bit'

>

> Cc: Bob Feng <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>>

> Cc: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>

> Cc: Leif Lindholm <leif.lindholm@linaro.org<mailto:leif.lindholm@linaro.org>>

> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>

> ---

>   BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------

>   1 file changed, 20 insertions(+), 18 deletions(-)

>

> diff --git a/BaseTools/Scripts/SetupGit.py

> b/BaseTools/Scripts/SetupGit.py index 3d39d3b35f..514f1c4d42 100644

> --- a/BaseTools/Scripts/SetupGit.py

> +++ b/BaseTools/Scripts/SetupGit.py

> @@ -2,6 +2,7 @@

>   #  Set up the git configuration for contributing to TianoCore

> projects  #  #  Copyright (c) 2019, Linaro Ltd. All rights

> reserved.<BR>

> +#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>

>   #

>   #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -53,29 +54,30

> @@ MIN_GIT_VERSION = (1, 9, 0)

>

>   # Set of options to be set identically for all repositories  OPTIONS = [

> -    {'section': 'am',          'option': 'keepcr',         'value': True},

> -    {'section': 'am',          'option': 'signoff',        'value': True},

> -    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},

> -    {'section': 'color',       'option': 'diff',           'value': True},

> -    {'section': 'color',       'option': 'grep',           'value': 'auto'},

> -    {'section': 'commit',      'option': 'signoff',        'value': True},

> -    {'section': 'core',        'option': 'abbrev',         'value': 12},

> +    {'section': 'am',          'option': 'keepcr',            'value': True},

> +    {'section': 'am',          'option': 'signoff',           'value': True},

> +    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},

> +    {'section': 'color',       'option': 'diff',              'value': True},

> +    {'section': 'color',       'option': 'grep',              'value': 'auto'},

> +    {'section': 'commit',      'option': 'signoff',           'value': True},

> +    {'section': 'core',        'option': 'abbrev',            'value': 12},

>       {'section': 'core',        'option': 'attributesFile',

>        'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},

> -    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},

> -    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},

> +    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},

> +    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},

>       {'section': 'diff',        'option': 'orderFile',

>        'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},

> -    {'section': 'diff',        'option': 'renames',        'value': 'copies'},

> -    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},

> -    {'section': 'diff "ini"',    'option': 'xfuncname',

> +    {'section': 'diff',        'option': 'renames',           'value': 'copies'},

> +    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},

> +    {'section': 'diff "ini"',  'option': 'xfuncname',

>        'value': '^\\\\[[A-Za-z0-9_., ]+]'},

> -    {'section': 'format',      'option': 'coverLetter',    'value': True},

> -    {'section': 'format',      'option': 'numbered',       'value': True},

> -    {'section': 'format',      'option': 'signoff',        'value': False},

> -    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},

> -    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},

> -    {'section': 'sendemail',   'option': 'thread',         'value': True},

> +    {'section': 'format',      'option': 'coverLetter',       'value': True},

> +    {'section': 'format',      'option': 'numbered',          'value': True},

> +    {'section': 'format',      'option': 'signoff',           'value': False},

> +    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},

> +    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},

> +    {'section': 'sendemail',   'option': 'thread',            'value': True},

> +    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},



Unfortunately I never received the original patch.

I downloaded it from

https://www.redhat.com/archives/edk2-devel-archive/2019-December/msg00720.html

but I get an error when applying:



**** malformed patch at line 12: -    {'section': 'am',

'option': 'signoff',        'value': True},



Due to space/tab? changes, your patch is very hard to review (I wanted to look at it with 'git-diff --word-diff=color'. If I missed anything, you simply added:



+    {'section': 'sendemail',   'option': 'transferEncoding',  'value':

'8bit'},



Is that right?



>       ]

>

>

> --

> 2.24.0.windows.2

>

>

>

>

>

>

>









[-- Attachment #1.1.2: Type: text/html, Size: 19320 bytes --]

[-- Attachment #1.2: image001.png --]
[-- Type: image/png, Size: 97681 bytes --]

[-- Attachment #2: 0001-BaseTools-Scripts-Add-sendemail.transferEncoding-to-.patch --]
[-- Type: application/octet-stream, Size: 4793 bytes --]

From 827367ebe1d5a093037da024ac4e8f81db8e1549 Mon Sep 17 00:00:00 2001
From: Nate DeSimone <nathaniel.l.desimone@intel.com>
Date: Fri, 6 Dec 2019 09:58:41 -0800
Subject: [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py

If git 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, the SetupGit.py script
will now explicitly set the sendemail.transferEncoding git
config option to '8bit'

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 BaseTools/Scripts/SetupGit.py | 38 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py
index 3d39d3b35f..514f1c4d42 100644
--- a/BaseTools/Scripts/SetupGit.py
+++ b/BaseTools/Scripts/SetupGit.py
@@ -2,6 +2,7 @@
 #  Set up the git configuration for contributing to TianoCore projects
 #
 #  Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR>
+#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -53,29 +54,30 @@ MIN_GIT_VERSION = (1, 9, 0)
 
 # Set of options to be set identically for all repositories
 OPTIONS = [
-    {'section': 'am',          'option': 'keepcr',         'value': True},
-    {'section': 'am',          'option': 'signoff',        'value': True},
-    {'section': 'cherry-pick', 'option': 'signoff',        'value': True},
-    {'section': 'color',       'option': 'diff',           'value': True},
-    {'section': 'color',       'option': 'grep',           'value': 'auto'},
-    {'section': 'commit',      'option': 'signoff',        'value': True},
-    {'section': 'core',        'option': 'abbrev',         'value': 12},
+    {'section': 'am',          'option': 'keepcr',            'value': True},
+    {'section': 'am',          'option': 'signoff',           'value': True},
+    {'section': 'cherry-pick', 'option': 'signoff',           'value': True},
+    {'section': 'color',       'option': 'diff',              'value': True},
+    {'section': 'color',       'option': 'grep',              'value': 'auto'},
+    {'section': 'commit',      'option': 'signoff',           'value': True},
+    {'section': 'core',        'option': 'abbrev',            'value': 12},
     {'section': 'core',        'option': 'attributesFile',
      'value': os.path.join(CONFDIR, 'gitattributes').replace('\\', '/')},
-    {'section': 'core',        'option': 'whitespace',     'value': 'cr-at-eol'},
-    {'section': 'diff',        'option': 'algorithm',      'value': 'patience'},
+    {'section': 'core',        'option': 'whitespace',        'value': 'cr-at-eol'},
+    {'section': 'diff',        'option': 'algorithm',         'value': 'patience'},
     {'section': 'diff',        'option': 'orderFile',
      'value': os.path.join(CONFDIR, 'diff.order').replace('\\', '/')},
-    {'section': 'diff',        'option': 'renames',        'value': 'copies'},
-    {'section': 'diff',        'option': 'statGraphWidth', 'value': '20'},
-    {'section': 'diff "ini"',    'option': 'xfuncname',
+    {'section': 'diff',        'option': 'renames',           'value': 'copies'},
+    {'section': 'diff',        'option': 'statGraphWidth',    'value': '20'},
+    {'section': 'diff "ini"',  'option': 'xfuncname',
      'value': '^\\\\[[A-Za-z0-9_., ]+]'},
-    {'section': 'format',      'option': 'coverLetter',    'value': True},
-    {'section': 'format',      'option': 'numbered',       'value': True},
-    {'section': 'format',      'option': 'signoff',        'value': False},
-    {'section': 'notes',       'option': 'rewriteRef',     'value': 'refs/notes/commits'},
-    {'section': 'sendemail',   'option': 'chainreplyto',   'value': False},
-    {'section': 'sendemail',   'option': 'thread',         'value': True},
+    {'section': 'format',      'option': 'coverLetter',       'value': True},
+    {'section': 'format',      'option': 'numbered',          'value': True},
+    {'section': 'format',      'option': 'signoff',           'value': False},
+    {'section': 'notes',       'option': 'rewriteRef',        'value': 'refs/notes/commits'},
+    {'section': 'sendemail',   'option': 'chainreplyto',      'value': False},
+    {'section': 'sendemail',   'option': 'thread',            'value': True},
+    {'section': 'sendemail',   'option': 'transferEncoding',  'value': '8bit'},
     ]
 
 
-- 
2.24.0.windows.2


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

end of thread, other threads:[~2020-01-02 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <15DDDAE6FE3C410D.8264@groups.io>
2019-12-18  3:01 ` [edk2-devel] [PATCH] BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py Nate DeSimone
2019-12-18  6:08   ` Bob Feng
2019-12-18 18:11   ` Philippe Mathieu-Daudé
2019-12-20  7:39     ` Bob Feng
2020-01-02 16:52     ` Nate DeSimone

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