Selaa lähdekoodia

Add fix for issue #915 (#916)

Co-authored-by: André Breuer <andre.breuer@ndaal.eu>
anotherbridge 3 vuotta sitten
vanhempi
commit
0d471653b5
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      detect/git/git.go

+ 7 - 1
detect/git/git.go

@@ -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") {