Skip to content

git: Fix discarding untracked files on Windows subst drives #248552

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Parasaran-Python
Copy link
Contributor

Handle virtual drive paths correctly when discarding untracked files by:

  • Using the repository's rootRealPath to convert subst drive paths to real paths

  • Adding fallback to 'git clean' when filesystem deletion fails

  • Adding tests to verify path transformation logic works correctly

Fixes #248369

@Parasaran-Python Parasaran-Python marked this pull request as ready for review May 10, 2025 06:22
@Parasaran-Python Parasaran-Python force-pushed the 248369 branch 2 times, most recently from 69353d0 to dd1fa01 Compare May 11, 2025 09:20
@Parasaran-Python
Copy link
Contributor Author

Hello @lszomoru requesting a review.

@Parasaran-Python Parasaran-Python force-pushed the 248369 branch 4 times, most recently from 64a97ac to 9511188 Compare May 17, 2025 13:27
@Parasaran-Python
Copy link
Contributor Author

Hi @lszomoru requesting for a review. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git - discard changes of a new untracked file fails when using a subst drive
2 participants