diff --git a/git_deps/detector.py b/git_deps/detector.py index ce73762..7d51a9d 100644 --- a/git_deps/detector.py +++ b/git_deps/detector.py @@ -158,7 +158,7 @@ def blame_diff_hunk(self, dependent, parent, path, hunk): self.logger.info(" Blaming hunk %s @ %s (listed below)" % (line_range_before, parent.hex[:8])) - if not self.tree_lookup(path, parent): + if not self.tree_lookup(path, parent) or hunk.old_start == 0: # This is probably because dependent added a new directory # which was not previously in the parent. return