aboutsummaryrefslogtreecommitdiffstats
path: root/git_deps
diff options
context:
space:
mode:
Diffstat (limited to 'git_deps')
-rw-r--r--git_deps/detector.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/git_deps/detector.py b/git_deps/detector.py
index 1c78a42..3111a38 100644
--- a/git_deps/detector.py
+++ b/git_deps/detector.py
@@ -198,6 +198,18 @@ class DependencyDetector(object):
continue
if dependency_sha1 not in self.dependencies[dependent_sha1]:
+ if not self.seen_commit(dependency):
+ self.notify_listeners("new_commit", dependency)
+ self.dependencies[dependent_sha1][dependency_sha1] = {}
+
+ self.notify_listeners("new_dependency",
+ dependent, dependency, path, line_num)
+
+ self.logger.debug(
+ " New dependency %s -> %s via line %s (%s)" %
+ (dependent_sha1[:8], dependency_sha1[:8], line_num,
+ GitUtils.oneline(dependency)))
+
if dependency_sha1 in self.todo_d:
self.logger.debug(
" Dependency on %s via line %s already in TODO"
@@ -210,14 +222,6 @@ class DependencyDetector(object):
(dependency_sha1[:8], line_num,))
continue
- self.logger.debug(
- " New dependency %s -> %s via line %s (%s)" %
- (dependent_sha1[:8], dependency_sha1[:8], line_num,
- GitUtils.oneline(dependency)))
- self.dependencies[dependent_sha1][dependency_sha1] = {}
- self.notify_listeners('new_commit', dependency)
- self.notify_listeners('new_dependency',
- dependent, dependency, path, line_num)
if dependency_sha1 not in self.dependencies:
if self.options.recurse:
self.todo.append(dependency)