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
Git: Symlink support #5970
Comments
It would be nice to find nested git repos as well. Some of us are fortunate enough to not code on Monoliths. |
It would be nice to have an option to NOT do GIT change tracking inside symlinks. If my symlink is to another folder in the same git repo I don't want the changed files showing up twice in Code's Git view. |
This issue is about displaying symlinks in the git view and what happens when you click them. Neither Code nor git follow (or should follow) the symlinks. |
Ok, off topic, but I am seeing VScode following symlinks in the git view. Running "git status" does not show these files. Should I create a new issue or discuss this somewhere else? |
Can you take a screenshot to show me what you mean? |
I know what causes it. Here's my mount command: |
Actually, no more errors when you click it. We handle it nicely, even with decorations. |
We just can't handle the root being a symlink in itself. |
VSCode just crashed my Macbook when editing files inside a symlink that pointed to its parent ( |
@dbaeumer Was having the same issue described in microsoft/vscode-eslint#309 when opening symlink project folders, it seems to me that it's related to this one. |
I'm adding another $300 bounty to this issue; as mind-boggling as it is to see it still be a problem 5 years later, we're still losing productivity to the crashes and long delays associated with the occasional use of SSHFS for remote editing. |
Currently the local issue is fixed. |
Add some issues in bash
|
Just chiming in that I support solving this issue as I lost about a two days trying to get my git gutter indicators to shown, only to realize my home folder on the remote machine is symlinked. |
this is the most annoying bug i've ever encountered yet still not fixed after 5 years. |
Was reported in 1.0.0, I am on 1.61.0-insider and it still does not work For anyone looking for a work-around: I do find GitLens extension's Gutter Changes view a functional replacement for built-in gutter indicators. You just have to go to settings and enable it for all files (by default you have to toggle it on for each file separately). It works just fine on both shared/NFS mounts and local directories. |
I'm affected by the same bug. I need this symlink support, because all my projects reside in a directory on another mount-point and symlinked into my home directory. |
Still a very annoying issue for me too. I work a lot on cluster dev nodes via SSH and the entire home dir is dynamically loaded through symlinks, no way of replacing it with absolute paths. |
Agreed. This needs to get fixed. |
This issue affects ROS uses who symlink various directories in the |
Main description.I have found different problems when adding a folder to the workspace / open a project when that project is in a path with a symbolic link on a parent directory. For example. /home/user/project being a symbolic link to /home/user/other/customer/whatever/projects. This issue is not related to any language, extension or configuration settings. I had this problem with totally different projects and computers. Steps to reproduce:
Actual: Looks like the tests are running but test status never change from not runned status. NotesWith this scenario I had found at least two problems.
I suspect that many other issues would have the same root cause. Mean while this is not fixed. Maybe useful to at least add a warning or notes in the main documentation that opening a new project from a path with symbolic links might include some inconsistencies. |
This problem also occurs on Windows when the drive portion of the path pointing to the git project is a subst drive. For example, if I open vscode as shown below I don't see git related modifications shown in the gutter nor does the commit history show up in the timeline view:
|
I can confirm this behaviour in VSCode 1.67.2 .. both native git gutters without any extensions installed, and with gitlens installed.. If you open the workspace file inside the subst drive, gutter annotations and modifications and file modification status won't show up. But if you open the same workspace file directly from the non-subst drive, then everything shows up and works as expected. Again, true for both native gutter display, and with gitlens installed. I've also tried to make sure all the folders both subst and original have been trusted by workspace trust - to no avail. Is there some reason why this does not work? Or some reason why it (seems like) will not be resolved after 6 years and numerous duplicate issues raised and closed? Maybe something in the manual/readme/known issues/wiki.. ? |
+1 for getting this fixed! |
Also confirming that it is behaving correctly on VSCode 1.67.2 for me. edit: this is on Windows 10 |
On Fedora 36:
it is not fixed. |
On Windows 11 Pro (21H2) with wsl2 Ubuntu 20.04.4 LTS with VSCode 1.68.1 |
Steps to Reproduce:
ln -s /foo/bar .
/bar
folder.If now you click on staged
/bar
folder, you'll get an errorWarn: Can't open this git resource.
The text was updated successfully, but these errors were encountered: