[X2Go-Commits] [maintenancescripts] 01/01: git/hooks/x2go-post-receive-{close-bugs, tag-pending}: split up real name and address part locally in script and only MIME-encode the real name to not violate standards.
git-admin at x2go.org
git-admin at x2go.org
Mon Mar 6 11:10:51 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository maintenancescripts.
commit 4047138985183b106d8a23022d7bc033af66d2b2
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Mar 6 11:10:43 2017 +0100
git/hooks/x2go-post-receive-{close-bugs,tag-pending}: split up real name and address part locally in script and only MIME-encode the real name to not violate standards.
---
git/hooks/x2go-post-receive-close-bugs | 6 ++++--
git/hooks/x2go-post-receive-tag-pending | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/git/hooks/x2go-post-receive-close-bugs b/git/hooks/x2go-post-receive-close-bugs
index 7f0cdfe..d558512 100755
--- a/git/hooks/x2go-post-receive-close-bugs
+++ b/git/hooks/x2go-post-receive-close-bugs
@@ -38,8 +38,10 @@ function send_mail () { # send_mail bugno revno diff_file
# Switch to a python implementation until https://bugs.launchpad.net/ubuntu/+source/libencode-perl/+bug/1670226 is fixed.
#local from="$(git show -s --pretty='format:%cn <%ce>' "$(git rev-parse --verify "${newrev}^{commit}")" |
# perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')"
- local from="$(git show -s --pretty='format:%cn <%ce>' "$(git rev-parse --verify "${newrev}^{commit}")" |
- python3.5 -c 'from email.header import Header; import fileinput;[print(Header(line, "UTF-8").encode()) for line in fileinput.input()]')"
+ local realname="$(git show -s --pretty='format:%cn' "$(git rev-parse --verify "${newrev}^{commit}")" |
+ python3.5 -c 'from email.header import header; import fileinput;[print(header(line, "utf-8").encode()) for line in fileinput.input()]')"
+ local address="$(git show -s --pretty='format:%cn <%ce>' "$(git rev-parse --verify "${newrev}^{commit}")")"
+ local from="${realname} ${address}"
(cat <<EOF
From: ${from}
To: ${bug}-submitter at bugs.x2go.org
diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending
index b3cf7fa..b9b568b 100755
--- a/git/hooks/x2go-post-receive-tag-pending
+++ b/git/hooks/x2go-post-receive-tag-pending
@@ -37,8 +37,10 @@ function send_mail () { # send_mail bugno revno diff_file
# Switch to a python implementation until https://bugs.launchpad.net/ubuntu/+source/libencode-perl/+bug/1670226 is fixed.
#local from="$(git show -s --pretty='format:%cn <%ce>' "${rev}" |
# perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')"
- local from="$(git show -s --pretty='format:%cn <%ce>' "${rev}" |
- python3.5 -c 'from email.header import Header; import fileinput;[print(Header(line, "UTF-8").encode()) for line in fileinput.input()]')"
+ local realname="$(git show -s --pretty='format:%cn' "${rev}" |
+ python3.5 -c 'from email.header import Header; import fileinput;[print(Header(line, "UTF-8").encode()) for line in fileinput.input()]')"
+ local address="$(git show -s --pretty='format:<%ce>' "${rev}")"
+ local from="${realname} ${address}"
(cat <<EOF
From: ${from}
To: ${bug}-submitter at bugs.x2go.org
--
Alioth's /srv/git/code.x2go.org/maintenancescripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list