Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantmimani committed Oct 26, 2021
1 parent 09c8866 commit d45216c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tartufo/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,9 @@ def chunks(self) -> Generator[types.Chunk, None, None]:
for curr_commit in self._repo.walk(
branch.resolve().target, pygit2.GIT_SORT_TOPOLOGICAL
):
# If a commit doesn't have a parent skip diff generation since it is the first commit
if not curr_commit.parents:
self.logger.debug(f"Skipping commit {curr_commit.hex} because it has no parents")
continue
prev_commit = curr_commit.parents[0]
diff: pygit2.Diff = self._repo.diff(curr_commit, prev_commit)
Expand Down

0 comments on commit d45216c

Please sign in to comment.