fix: update gitleaks/go-diff to latest version

This commit is contained in:
Daniel Hougaard
2025-05-09 04:40:09 +04:00
parent 394bd6755f
commit 5408859a18
8 changed files with 14 additions and 8 deletions

View File

@@ -69,7 +69,9 @@ func GitLog(source string, logOpts string) (<-chan *gitdiff.File, error) {
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
time.Sleep(50 * time.Millisecond)
return gitdiff.Parse(cmd, stdout)
reader := bufio.NewReader(stdout)
return gitdiff.Parse(reader)
}
// GitDiff returns a channel of gitdiff.File objects from
@@ -101,7 +103,9 @@ func GitDiff(source string, staged bool) (<-chan *gitdiff.File, error) {
// HACK: to avoid https://github.com/zricethezav/gitleaks/issues/722
time.Sleep(50 * time.Millisecond)
return gitdiff.Parse(cmd, stdout)
reader := bufio.NewReader(stdout)
return gitdiff.Parse(reader)
}
// listenForStdErr listens for stderr output from git and prints it to stdout