Skip to content

Commit

Permalink
BaseTools/Scripts: Add sendemail.transferEncoding to SetupGit.py
Browse files Browse the repository at this point in the history
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'

Signed-off-by: Nate DeSimone <[email protected]>

Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Leif Lindholm <[email protected]>
Reviewed-by: Bob Feng <[email protected]>
  • Loading branch information
nate-desimone authored and mergify[bot] committed Dec 24, 2019
1 parent 123b720 commit a5abd9c
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions BaseTools/Scripts/SetupGit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -53,29 +54,30 @@

# 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'},
]


Expand Down

0 comments on commit a5abd9c

Please sign in to comment.