Do not crash when there is a "|" in the commit line
authorLaurent Bachelier <laurent@bachelier.name>
Wed, 23 Jan 2013 21:45:19 +0000 (22:45 +0100)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 25 Jan 2013 03:22:46 +0000 (22:22 -0500)
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irkerhook.py

index 96f7d1f315c3bf9d4ceb2515308f024cd6d29db8..527266f901895d53cbf4500e38ea544aed1d9e11 100755 (executable)
@@ -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