Fix a bug in reporting of multi-line commits.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 28 Sep 2012 19:43:14 +0000 (15:43 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 28 Sep 2012 19:43:14 +0000 (15:43 -0400)
NEWS
irkerhook.py

diff --git a/NEWS b/NEWS
index d6014cef02440d2ea2b4f039c703799cca923e38..7f4a9ed3d10bb8cb95f7afcf422442c3aace9456 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,5 +5,7 @@
 
 1.1 @ 2012-09-28
   Add a delay to avoid threads spinning on the empty-queue-check, eating CPU.
+  Fix a bug in reporting of multi-file commits.
+
 
 
index 25a10fb929de7d14f67804a38e57575d1a686526..15c67ff996da3c0e9ac33408798bed1ba09ddbbf 100755 (executable)
@@ -73,7 +73,7 @@ tinyifier = "http://tinyurl.com/api-create.php?url="
 
 import os, sys, commands, socket, urllib, json
 
-version = "1.0"
+version = "1.1"
 
 def do(command):
     return commands.getstatusoutput(command)[1]
@@ -131,7 +131,8 @@ class GitExtractor:
             self.rev = self.commit[:12]
 
         # Extract the meta-information for the commit
-        self.files = do("git diff-tree -r --name-only '"+ self.commit +"' | sed -e '1d' -e 's-.*-&-'")
+        self.files = do("git diff-tree -r --name-only '"+ self.commit +"'")
+        self.files = " ".join(self.files.strip().split("\n")[1:])
         metainfo = do("git log -1 '--pretty=format:%an <%ae>%n%s' " + self.commit)
         (self.author, self.logmsg) = metainfo.split("\n")
         # This discards the part of the author's address after @.