mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Co-authored-by: André Breuer <andre.breuer@ndaal.eu>
This commit is contained in:
1 parent
f615d0397d
commit
0d471653b5
1 file changed
+7
-1
+7
-1
@@ -85,18 +85,24 @@ func listenForStdErr(stderr io.ReadCloser) {
|
|||||||
scanner := bufio.NewScanner(stderr)
|
scanner := bufio.NewScanner(stderr)
|
||||||
errEncountered := false
|
errEncountered := false
|
||||||
for scanner.Scan() {
|
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.
|
// exhaustive rename detection was skipped due to too many files.
|
||||||
// you may want to set your diff.renameLimit variable to at least
|
// you may want to set your diff.renameLimit variable to at least
|
||||||
// (some large number) and retry the command.
|
// (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
|
// 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
|
// to send data to stdout and finish executing. This next bit of
|
||||||
// code prevents gitleaks from stopping mid scan if this error is
|
// code prevents gitleaks from stopping mid scan if this error is
|
||||||
// encountered
|
// encountered
|
||||||
if strings.Contains(scanner.Text(),
|
if strings.Contains(scanner.Text(),
|
||||||
"exhaustive rename detection was skipped") ||
|
"exhaustive rename detection was skipped") ||
|
||||||
|
strings.Contains(scanner.Text(),
|
||||||
|
"inexact rename detection was skipped") ||
|
||||||
strings.Contains(scanner.Text(),
|
strings.Contains(scanner.Text(),
|
||||||
"you may want to set your diff.renameLimit") {
|
"you may want to set your diff.renameLimit") {
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user