draft: bump gitdiff, add git.Err state, better log messages (#954)

* bump gitdiff, add git.Err state, better log messages

* remove cmd.Start

* forgot to start...
This commit is contained in:
Zachary Rice authored and GitHub committed 2022-08-16 19:36:25 -05:00
1 parent 1b3f10cb79
commit b6b7cfb6d3
5 files changed
+46 -26

No files matched your search

+3
View File
@@ -342,6 +342,9 @@ func (d *Detector) DetectGit(source string, logOpts string, gitScanType GitScanT
return d.findings, err
}
log.Debug().Msgf("%d commits scanned. Note: this number might be smaller than expected due to commits with no additions", len(d.commitMap))
if git.ErrEncountered {
return d.findings, fmt.Errorf("%s", "git error encountered, see logs")
}
return d.findings, nil
}