summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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