From: Eric S. Raymond Date: Fri, 30 May 2014 14:26:21 +0000 (-0400) Subject: Cope better with hirerarchical branch names. X-Git-Tag: 2.8~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9384964bcdd1da3e9488adac5d54ac8e4549f8d;p=irker.git Cope better with hirerarchical branch names. From an idea by tasn. --- diff --git a/irkerhook.py b/irkerhook.py index 5f15032..e598330 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -259,7 +259,7 @@ 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) + commit.branch = re.sub(r"^refs/[^/]*/", "", self.refname) # Compute a description for the revision if self.revformat == 'raw': commit.rev = commit.commit