summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-04-13 21:03:05 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-04-13 21:03:05 +0200
commit6d64b0be7df342d114b31427e03fc99d28b74e4f (patch)
treeec48ce5a0805263fbe98f22328ba41e47aa34194
parentff5e354ae3d45b424976fe2319b5b3cd6dd95c26 (diff)
Removed redundant code in get_branch.
-rwxr-xr-xgitnoti.py6
1 files changed, 1 insertions, 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]