[X2Go-Commits] [maintenancescripts] 01/01: git/hooks/update-script._irkerhook.py_: use correct git
git-admin at x2go.org
git-admin at x2go.org
Tue Mar 31 08:46:36 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository maintenancescripts.
commit 27adfc576904ed8c664cc395dadcfba336ccaf0c
Author: Mihai Moldovan <ionic at ionic.de>
Date: Tue Mar 31 08:45:18 2015 +0200
git/hooks/update-script._irkerhook.py_: use correct git
log formatting
Also truncate
output if
it exceeds
six
lines.
(This is also a test commit message.)
---
git/hooks/update-script._irkerhook.py_ | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/git/hooks/update-script._irkerhook.py_ b/git/hooks/update-script._irkerhook.py_
index e79e7f1..f4e9cb5 100755
--- a/git/hooks/update-script._irkerhook.py_
+++ b/git/hooks/update-script._irkerhook.py_
@@ -281,9 +281,14 @@ class GitExtractor(GenericExtractor):
# conventionally supposed to be a summary of the commit. Under
# other VCSes a different choice may be appropriate.
commit.author_name, commit.mail, commit.logmsg = \
- do("git log -1 '--pretty=format:%an%n%ae%n%s' " + shellquote(commit.commit)).split("\n", 2)
+ do("git log -1 '--pretty=format:%an%n%ae%n%s%b' " + shellquote(commit.commit)).split("\n", 2)
# Discard empty lines
- commit.logmsg = "\n".join([line for line in commit.logmsg.split("\n") if line.strip()])
+ tmp = [line for line in commit.logmsg.split("\n") if line.strip()]
+
+ if (len(tmp) > 6)
+ tmp[:5].append ("%(blue)s...%(reset)s message truncated")
+
+ commit.logmsg = "\n".join(tmp)
# This discards the part of the author's address after @.
# Might be be nice to ship the full email address, if not
# for spammers' address harvesters - getting this wrong
--
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