@@ -, +, @@ front-slashes. --- irkerhook.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/irkerhook.py +++ a/irkerhook.py @@ -39,7 +39,7 @@ default_channels = "irc://chat.freenode.net/#commits" version = "2.7" -import os, sys, commands, socket, urllib, subprocess, locale, datetime +import os, sys, commands, socket, urllib, subprocess, locale, datetime, re from pipes import quote as shellquote try: import simplejson as json # Faster, also makes us Python-2.5-compatible @@ -258,7 +258,8 @@ class GitExtractor(GenericExtractor): def commit_factory(self, commit_id): "Make a Commit object holding data for a specified commit ID." commit = Commit(self, commit_id) - commit.branch = os.path.basename(self.refname) + # Get rid of refs/*/ for cleaner output. + commit.branch = re.sub(r"^refs/[^/]*/", "", self.refname) # Compute a description for the revision if self.revformat == 'raw': commit.rev = commit.commit