vscode-remote-release
vscode-remote-release copied to clipboard
Files replaced with symlinks under WSL are not being detected as changed by VScode run from WSL
- VSCode Version: 1.49.1
- OS Version: Windows_NT x64 10.0.19041
Steps to Reproduce:
# steps run from WSL terminal launched in an empty directory
git init
mkdir subdir
ls > basefile.txt
git add --all
git commit -a -m initial-commit
cp basefile.txt subdir
code .
# Should now have both VScode and the terminal screen open tied to the same directory
## Visual code reports one file modified as expected
git status
## shows the untracked file in `subdir`
git add --all
git commit -a -m 2nd-commit
## the previous two commands run successfully
git status
## shows a clean working tree
## but VScode still shows the outstanding original change
## clicking refresh in VScode shows a clean working tree
ls > 2ndfile.txt
git status
## shows new untracked file
## VScode shows the new file, but does not list it as new
## if you hit refresh in VScode the file shows up as a new file for git
git add --all
git commit -a -m 3rd-commit
git status
## shows a clean working tree
## but VScode still shows the outstanding original change
## clicking refresh in VScode shows a clean working tree
cd subdir/
ln -s ../2ndfile.txt .
ls -la
git status
## shows the untracked file in `subdir`
## But in VScode the file does not show up in the Explorer
ls > 3rdfile.txt
git status
## now shows two untracked file in `subdir`
## if you hit refresh in VScode both files show up in Explorer and as new files for git
git add --all
git commit -a -m 4th-commit
git status
## shows a clean working tree
## but VScode still shows the outstanding original change
## clicking refresh in VScode shows a clean working tree
rm *.txt
git status
## shows 3 files in `subdir` tagged for deletion
## if you hit refresh in VScode the same changes show up there
ln -s ../*.txt .
git status
## Shows as expected:
### deleted: 3rdfile.txt
### typechange: basefile.txt
## Hitting refresh in VScode only shows the deletion of '/3rdfile.txt' and is missing the type change on 'basefile.txt'
## if you commit the change from vscode it shows a clean working directory
git status
## But this still shows
### typechange: basefile.txt
The bug is the fact that a symlink is not detected as a change, while a new symlink does show up as a change.
It would also be nice if the VSCode explorer and git integration detected the changes to the underlying file structure more dynamically. VSCode appears to do a much better job of this when using the Native Windows version on top of the native Windows file system. But when doing cross-platform development where the code base uses symlinks and/or illegal Windows characters in file and directory names (ie: ':' character) this forces you to use the WSL filesystem and VSCode in WSL.
Does this issue occur when all extensions are disabled?: Yes/No - Did not test