From f9384964bcdd1da3e9488adac5d54ac8e4549f8d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 30 May 2014 10:26:21 -0400 Subject: [PATCH] Cope better with hirerarchical branch names. From an idea by tasn. --- irkerhook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2