summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-11-28 20:37:14 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-11-28 20:37:14 +0100
commit55582f497e0e0629f13a03165b59ca033cb4a207 (patch)
tree2c89c2f3cae51fc5c23cb6eb1787963270bf3f7d
parentab1837d824ae1adc5eb32b928200ac673da218e7 (diff)
Assume initial commit or orphan branch when no 'last' commit is set or no parents exists.
-rwxr-xr-xgitnoti.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitnoti.py b/gitnoti.py
index 528f42b..6ffcec2 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -165,8 +165,8 @@ class ReposNotifyEvent(pyinotify.ProcessEvent):
commits = list(repo.iter_commits('%s..%s' % (last, h.name)))
elif len(h.commit.parents): # Check against parent commit
commits = list(repo.iter_commits('%s..%s' % (h.commit.parents[0], h.name)))
- else: # No valid commits to check against
- continue
+ else: # Initial commit or orphan branch was pushed
+ commits = list(repo.iter_commits(h.name))
if not len(commits): # No commits
continue