Giter Site home page Giter Site logo

Comments (4)

groboclown avatar groboclown commented on September 21, 2024

One possible fix is to change the NewGitDiffCmd function to call the parser like:

errCh := make(chan error)
go listenForStdErr(stderr, errCh)

gitdiffFiles, err := gitdiff.Parse(stdout, errCh)

and change the Parse to accept the error channel, and change the on-error return to now send the error to the error channel + return.

Unfortunately, this is a backwards-incompatible change for the go-gitdiff command.

from gitleaks.

groboclown avatar groboclown commented on September 21, 2024

Along with this, it looks like the DetectGit function's case err, open := <-errCh can cause the function to hang unless the d.Sema is dealt with.

from gitleaks.

zricethezav avatar zricethezav commented on September 21, 2024

@groboclown thanks for bringing up this issue. Do you have a repo I can test with?

from gitleaks.

groboclown avatar groboclown commented on September 21, 2024

@zricethezav Unfortunately, I have not been able to trace the actions that lead to this behavior. I was seeing it with a complicated private repository. If I could find the way to generate it, it would also lead to a better bug report to the Git folks.

from gitleaks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.