Giter Club home page Giter Club logo

Comments (6)

grvijayan avatar grvijayan commented on May 21, 2024 4

I too have the same issue. I am commenting here hoping this gets bumped up.

from go-git.

pete-woods avatar pete-woods commented on May 21, 2024

I am also suffering this issue. It seems to me like when this library tries to calculate the changes it needs to make to the filesystem, it is including untracked files in the current state (coming from here: https://github.com/go-git/go-git/blob/master/worktree_status.go#L128 in the code).

This appears to happen as part of the "reset" (in resetIndex) porcelain layer. I think (probably naively) that untracked files should be excluded in its diffTreeWithStaging call here: https://github.com/go-git/go-git/blob/master/worktree.go#L315.

from go-git.

github-actions avatar github-actions commented on May 21, 2024

To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.

This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.

We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.

Thanks for your understanding and cooperation!

from go-git.

pete-woods avatar pete-woods commented on May 21, 2024

It's still a pretty serious bug

from go-git.

pjbgf avatar pjbgf commented on May 21, 2024

@pete-woods would you be able to share an example on how to reproduce the issue please?

from go-git.

pete-woods avatar pete-woods commented on May 21, 2024

If I remember correctly, simply doing a "hard git reset" in a directory with untracked files is enough. Instead of only reverting tracked files, any untracked files are also deleted. This, of course, is not what's supposed to happen.

from go-git.

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.