GithubHelp home page GithubHelp logo

Comments (6)

ricksladkey avatar ricksladkey commented on July 16, 2024

You probably want to fix this your own way, but a quick-and-dirty fix can be found in my fork that just watches the .git folder itself and disables subdirectory watching. Watching the entire tree for any changes is overkill because then every rebuild that produces ignored files will make the diff unnecessarily dirty.

from gitdiffmargin.

laurentkempe avatar laurentkempe commented on July 16, 2024

@ricksladkey Thanks! I just continued the discussion with @nulltoken on stackoverflow to see if there is another way of doing without triggering the changes to the repository.

from gitdiffmargin.

nulltoken avatar nulltoken commented on July 16, 2024

@laurentkempe Calling ObjectDatabase.CreateBlob() will indeed update the content the .git\objects on the filesystem and there's currently no easy way by default to work around this.

One potential option would be to use a different odb backend dedicated to GitDiffMargin usage and give it a high priority. GitDiffMargin would read/write to this backend by default and fallback to the standard fs backend when an object hasn't been found in the new backend. This new backend could be an in-memory one (beware of the additional memory pressure) or disk based. You can find some guidance in implementing such back-end in libgit2sharp.voron.

Disclaimer: I'm not sure to understand why you need to monitor the changes to the .git folder, so my answer may be quite off. 😬

from gitdiffmargin.

laurentkempe avatar laurentkempe commented on July 16, 2024

@nulltoken We need to monitor the folder for changes which would happen out of Visual Studio. For example, commit, stash, change the same file from another editor.. in those cases we want to get the information and update the diff margin. Does libgit2sharp provides events like this to which we could attach?

from gitdiffmargin.

nulltoken avatar nulltoken commented on July 16, 2024

We need to monitor the folder for changes which would happen out of Visual Studio. For example, commit, stash, change the same file from another editor.. in those cases we want to get the information and update the diff margin.

Thanks for the info. Makes sense indeed.

Does libgit2sharp provides events like this to which we could attach?

It doesn't.

/cc @jamill

from gitdiffmargin.

laurentkempe avatar laurentkempe commented on July 16, 2024

Thanks @nulltoken then I will go with the solution of @ricksladkey for the moment

from gitdiffmargin.

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.