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

Extension API: workspace folders vs git repositories not consistent regarding symlinks #116064

Closed
letmaik opened this issue Feb 7, 2021 · 1 comment
Assignees
Labels
git GIT issues under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@letmaik
Copy link
Member

letmaik commented Feb 7, 2021

  • VSCode Version: 1.53.0
  • OS Version: Ubuntu 18.04

The paths in workspace.workspaceFolders do not have their symlinks resolved.
The paths in the git extension's API.repositories do have their symlinks resolved.
This seems inconsistent and makes life hard if you want to easily check the relation between the two paths.

It seems the git extension itself gets confused by this and shows the full path in the SCM view if the repo/workspace folder is in a symlinked folder. Notably, the file watcher also doesn't resolve symlinks.

I think the paths returned from the git extension should not have their symlinks resolved so that they can be easily compared with all the other paths from vs code.

@lszomoru
Copy link
Member

@letmaik, thank you very much for reporting this issue and apologies for not getting back to you on this. The git extension calls git.exe (ex: git rev-parse --show-toplevel) to determine the exact path of a repository. We are doing this so that we can handle scenarios in which the folder/workspace has been opened with incorrect casing of the path. At the moment git rev-parse resolves symbolic links and as far as I know, there are not plans to change this behaviour. So the git extension is limited to using the real path as the repository root.

I am not really sure what can be done here given the current constrains but I am opened for suggestions. We do have an issue to better handle repositories with symbolic links but at the moment this work has not been planned - #5970.

@lszomoru lszomoru added under-discussion Issue is under discussion for relevance, priority, approach and removed bug Issue identified by VS Code Team member as probable bug labels Dec 13, 2022
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants