aboutsummaryrefslogtreecommitdiffstats
path: root/git_deps/detector.py
diff options
context:
space:
mode:
Diffstat (limited to 'git_deps/detector.py')
-rw-r--r--git_deps/detector.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git_deps/detector.py b/git_deps/detector.py
index ce73762..1836a56 100644
--- a/git_deps/detector.py
+++ b/git_deps/detector.py
@@ -118,8 +118,10 @@ class DependencyDetector(object):
self.notify_listeners('new_commit', dependent)
- parent = dependent.parents[0]
- self.find_dependencies_with_parent(dependent, parent)
+ if dependent.parents: # the root commit does not have parents
+ parent = dependent.parents[0]
+ self.find_dependencies_with_parent(dependent, parent)
+
self.done.append(dependent_sha1)
self.done_d[dependent_sha1] = True
self.logger.info(" Found all dependencies for %s" %