From 6d64b0be7df342d114b31427e03fc99d28b74e4f Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 13 Apr 2010 21:03:05 +0200 Subject: Removed redundant code in get_branch. --- gitnoti.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gitnoti.py b/gitnoti.py index 0e51bd5..9759c43 100755 --- a/gitnoti.py +++ b/gitnoti.py @@ -215,11 +215,7 @@ class Bot(irc.IRCClient): if heads[0].name == branch: return heads[0] - heads = [h for h in repo.heads if h.name.startswith(branch)] - - if not len(heads): - self.msg(target, 'No branches matches "%s".' % branch) - elif len(heads) > 1: + if len(heads) > 1: self.msg(target, 'Ambiguous name: %s' % (', '.join([h.name for h in heads]))) else: return heads[0] -- cgit v1.2.3