|
|
@@ -85,18 +85,24 @@ func listenForStdErr(stderr io.ReadCloser) {
|
|
|
scanner := bufio.NewScanner(stderr)
|
|
|
errEncountered := false
|
|
|
for scanner.Scan() {
|
|
|
- // if git throws the following error:
|
|
|
+ // if git throws one of the following errors:
|
|
|
//
|
|
|
// exhaustive rename detection was skipped due to too many files.
|
|
|
// you may want to set your diff.renameLimit variable to at least
|
|
|
// (some large number) and retry the command.
|
|
|
//
|
|
|
+ // inexact rename detection was skipped due to too many files.
|
|
|
+ // you may want to set your diff.renameLimit variable to at least
|
|
|
+ // (some large number) and retry the command.
|
|
|
+ //
|
|
|
// we skip exiting the program as git log -p/git diff will continue
|
|
|
// to send data to stdout and finish executing. This next bit of
|
|
|
// code prevents gitleaks from stopping mid scan if this error is
|
|
|
// encountered
|
|
|
if strings.Contains(scanner.Text(),
|
|
|
"exhaustive rename detection was skipped") ||
|
|
|
+ strings.Contains(scanner.Text(),
|
|
|
+ "inexact rename detection was skipped") ||
|
|
|
strings.Contains(scanner.Text(),
|
|
|
"you may want to set your diff.renameLimit") {
|
|
|
|