diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-12 14:53:25 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-12 14:53:25 -0400 |
commit | 8917bc0acc6222eb6669cb5d22ad8b525e29b7c4 (patch) | |
tree | b5342038b629b869253a572983474f14c5cbaf1f | |
parent | e68ab474eb9baa62df43161d4cc46a512c853d52 (diff) | |
download | patatt-8917bc0acc6222eb6669cb5d22ad8b525e29b7c4.tar.gz |
Use --no-scissors when calling mailinfo
It's already the default, but this makes sure that we don't get a
different output if someone has mailinfo.scissors set in gitconfig.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | patatt/__init__.py | 5 |
2 files changed, 4 insertions, 3 deletions
@@ -47,7 +47,7 @@ in order to achieve the following: To achieve this, the message is passed through git-mailinfo with the following flags:: - cat orig.msg | git mailinfo --encoding=utf-8 m p > i + cat orig.msg | git mailinfo --encoding=utf-8 --no-scissors m p > i Patatt then uses the data found in "i" to replace the From: and Subject: headers of the original message, and concatenates "m" and "p" back diff --git a/patatt/__init__.py b/patatt/__init__.py index 373392d..a9e0ff6 100644 --- a/patatt/__init__.py +++ b/patatt/__init__.py @@ -46,7 +46,7 @@ REQ_HDRS = [b'from', b'subject'] KEYCACHE = dict() # My version -__VERSION__ = '0.2.0' +__VERSION__ = '0.3.0-dev' MAX_SUPPORTED_FORMAT_VERSION = 1 @@ -561,7 +561,7 @@ class PatattMessage: with tempfile.TemporaryDirectory(suffix='.git-mailinfo') as td: mf = os.path.join(td, 'm') pf = os.path.join(td, 'p') - cmdargs = ['git', 'mailinfo', '--encoding=utf-8', mf, pf] + cmdargs = ['git', 'mailinfo', '--encoding=utf-8', '--no-scissors', mf, pf] ecode, i, err = _run_command(cmdargs, stdin=payload) if ecode > 0: logger.debug('FAILED : Failed running git-mailinfo:') @@ -1059,6 +1059,7 @@ def command() -> None: help='Show debugging output') parser.add_argument('-s', '--section', dest='section', default=None, help='Use config section [patatt "sectionname"]') + parser.add_argument('--version', action='version', version=__VERSION__) subparsers = parser.add_subparsers(help='sub-command help', dest='subcmd') |