Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Discard all changes" doesn't delete files #91080

Closed
borekb opened this issue Feb 20, 2020 · 8 comments
Closed

"Discard all changes" doesn't delete files #91080

borekb opened this issue Feb 20, 2020 · 8 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@borekb
Copy link

borekb commented Feb 20, 2020

VS Code version: Code 1.42.1 (c47d83b, 2020-02-11T14:44:27.652Z)
OS version: macOS Catalina (Darwin x64 19.3.0)

Steps to Reproduce:

  1. Have some untracked files
  2. Click "Discard all changes"
  3. Confirm file deletion
  4. See how files are not deleted

Does this issue occur when all extensions are disabled?: Yes

Screen Recording 2020-02-20 at 13 30 48 2020-02-20 13_49_12


I've also verified this in Insiders 1.43.0-insider (9c341b3, 2020-02-20T05:36:57.672Z)

@borekb
Copy link
Author

borekb commented Feb 21, 2020

The files are in a .now folder – can the dot be significant? I've tried another file in a non-dot folder and discarding it from the SCM panel successfully deleted the file.

@jahusa02
Copy link

Having the same problem on Windows (Ver. 1909).

Have many untracked files i want do discard but nothing happens

@joaomoreno
Copy link
Member

@borekb Are you on git 2.25? Can you repro on an earlier git?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Feb 26, 2020
@luca-valentini
Copy link

having the same issue, git 2.25.0, macos 10.15.3

@borekb
Copy link
Author

borekb commented Mar 3, 2020

@joaomoreno It is indeed a regression with the Git 2.25.

Try Git 2.24:

$ brew unlink git
Unlinking /usr/local/Cellar/git/2.25.0_1... 205 symlinks removed

$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aacb808c01ea353820313b2fdf240923e53c301c/Formula/git.rb
[...]

$ git --version
git version 2.24.1

At this point, VSCode behaves correctly. ✅

Let's go back to Git 2.25:

$ brew switch git 2.25.0_1
[...]

$ git --version
git version 2.25.0

The issue is now reproducible again. 🚫

@joaomoreno
Copy link
Member

joaomoreno commented Apr 3, 2020

@borekb Git has since released 2.26, can you check?

@borekb
Copy link
Author

borekb commented Apr 3, 2020

@joaomoreno All's fine with 2.26.0 again 🎉.

Do you know if this was a Git bug? Discarding changes should be pretty stable by now I'd guess?!

@joaomoreno
Copy link
Member

joaomoreno commented Apr 3, 2020

Thanks a lot for confirming! Yeah, this wasn't the first bug we had with git 2.25... it was definitely buggy with regards to file paths...

@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants