Skip to content

Commit

Permalink
Check that required info is present (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-rich authored Apr 15, 2022
1 parent 1f55171 commit 09de492
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/sources/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ func (s *Git) ScanCommits(repo *git.Repository, path string, scanOptions *ScanOp
var depth int64
var reachedBase = false
for file := range fileChan {
if file == nil || file.PatchHeader == nil {
log.Debugf("file missing patch header, skipping")
continue
}
log.WithField("commit", file.PatchHeader.SHA).WithField("file", file.NewName).Trace("Scanning file from git")
if scanOptions.MaxDepth > 0 && depth >= scanOptions.MaxDepth {
log.Debugf("reached max depth")
Expand Down

0 comments on commit 09de492

Please sign in to comment.