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

Git gutters (still) do not work correctly if .git is a symlink #211355

Open
YaroST12 opened this issue Apr 25, 2024 · 4 comments
Open

Git gutters (still) do not work correctly if .git is a symlink #211355

YaroST12 opened this issue Apr 25, 2024 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues

Comments

@YaroST12
Copy link

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

  • VS Code Version: 1.88.1
  • OS Version: Linux x64 6.8.6-1.clear, Manjaro Linux

Steps to Reproduce:

  1. Create a repository with a file
  2. Make some changes to the file, commit them
  3. Checkout to a new branch
  4. Make some more changes to the file, commit them
  5. Move .git folder else where and symlink it back to the folder.
  6. Open the repo in vscode and open the test file
  7. Start switching branches

Expected behaviour: gutters should not show up after switching branches
Actual behaviour: gutters show up as if there are changes in the repo, even though there are no changes (git diff returns nothing, Source control tab - empty)

A workaround can be found here: https://stackoverflow.com/questions/75615136/vscode-vscodium-showing-git-gutters-even-though-there-are-no-actual-changes-in-t

This is a duplicate of since it's still reproduced and I can't re-open the old issue.

@gjsjohnmurray
Copy link
Contributor

This is a duplicate of since it's still reproduced and I can't re-open the old issue.

Please reference that issue.

@lszomoru lszomoru added the git GIT issues label May 27, 2024
@lszomoru
Copy link
Member

@YaroST12, thank you very much for filing this issue. At the moment VS Code only supports when the symlink is on the path of the workspace. We have not done any work to support to support a symlink to the .git folder.

@lszomoru lszomoru added the feature-request Request for new features or functionality label May 27, 2024
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone May 27, 2024
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@YaroST12
Copy link
Author

YaroST12 commented Jun 3, 2024

This is a duplicate of since it's still reproduced and I can't re-open the old issue.

Please reference that issue.

#176497

We have not done any work to support to support a symlink to the .git folder.

Understood, thanks. Maybe the workaround that I did via a bash script can be integrated somehow? It's rather trivial, if git is called by vscode - call realpath on the .git folder and use that instead of symlink's path (https://stackoverflow.com/questions/75615136/vscode-vscodium-showing-git-gutters-even-though-there-are-no-actual-changes-in-t)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality git GIT issues
Projects
None yet
Development

No branches or pull requests

4 participants