From: Laurent Bachelier Date: Wed, 23 Jan 2013 21:45:19 +0000 (+0100) Subject: Do not crash when there is a "|" in the commit line X-Git-Tag: 1.16~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=31f3e9a64ceb7bfbbf38dcf5552cf7c79965127a;p=irker.git Do not crash when there is a "|" in the commit line Signed-off-by: Eric S. Raymond --- diff --git a/irkerhook.py b/irkerhook.py index 96f7d1f..527266f 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -264,7 +264,7 @@ class GitExtractor(GenericExtractor): # conventionally supposed to be a summary of the commit. Under # other VCSes a different choice may be appropriate. metainfo = do("git log -1 '--pretty=format:%an <%ae>|%s' " + shellquote(commit.commit)) - (commit.author, commit.logmsg) = metainfo.split("|") + (commit.author, _, commit.logmsg) = metainfo.partition("|") commit.mail = commit.author.split()[-1].strip("<>") # This discards the part of the author's address after @. # Might be be nice to ship the full email address, if not