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: Symlink support #5970

Open
mrded opened this issue Apr 29, 2016 · 14 comments
Open

Git: Symlink support #5970

mrded opened this issue Apr 29, 2016 · 14 comments
Assignees
Milestone

Comments

@mrded
Copy link

@mrded mrded commented Apr 29, 2016

  • VSCode Version: 1.0.0 (1.0.0)
  • OS Version: OSX 10.11.4 (15E65)

Steps to Reproduce:

  1. Create a new project with git repository initialised.
  2. Create a folder /foo/bar
  3. Add a symlink from /foo/bar to /bar ln -s /foo/bar .
  4. Go to Git tab on vscode, and stage /bar folder.

If now you click on staged /bar folder, you'll get an error Warn: Can't open this git resource.

@jeremyjjbrown

This comment has been minimized.

Copy link

@jeremyjjbrown jeremyjjbrown commented Jun 2, 2016

It would be nice to find nested git repos as well. Some of us are fortunate enough to not code on Monoliths.

@joaomoreno joaomoreno added this to the Backlog milestone Jun 3, 2016
@mightypenguin

This comment has been minimized.

Copy link

@mightypenguin mightypenguin commented Sep 14, 2016

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.

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Sep 14, 2016

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.

@joaomoreno joaomoreno changed the title Problems with adding symlinks to git repository Can't open symlinks from git viewlet Sep 14, 2016
@mightypenguin

This comment has been minimized.

Copy link

@mightypenguin mightypenguin commented Sep 15, 2016

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?

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Sep 15, 2016

Can you take a screenshot to show me what you mean?

@mightypenguin

This comment has been minimized.

Copy link

@mightypenguin mightypenguin commented Sep 15, 2016

I know what causes it.
The git repo is a remotely mounted fuse file system.
The linux terminal shows permissions and symlinks properly, but for some reason vscode isn't.
If I create a simple git repo with a directory and a symlink to that directly it works properly on my local filesystem. If I move that to the fuse mounted file system it confuses vscode.

Here's my mount command:
sshfs hostname:/home/user/ /home/user/ -o sshfs_sync -o sync_readdir -o follow_symlinks -o kernel_cache -o max_background=50 -o big_writes

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Sep 17, 2018

Actually, no more errors when you click it. We handle it nicely, even with decorations.

@joaomoreno joaomoreno closed this Sep 17, 2018
@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Sep 18, 2018

We just can't handle the root being a symlink in itself.

@hyperfekt

This comment has been minimized.

Copy link

@hyperfekt hyperfekt commented Nov 28, 2018

Staging ranges of a file opened through a symlink is broken as well, and will lead to weird behavior where instead the file that is the symlink has the selected range staged and every other line from the target is displayed as changes in the symlink file in the git side bar.

@ryansully

This comment has been minimized.

Copy link

@ryansully ryansully commented May 20, 2019

This issue, specifically git gutters not displaying but maybe others as well, also occurs for remote symlinked git repos using the Remote - SSH extension.

@JustinAddams

This comment has been minimized.

Copy link

@JustinAddams JustinAddams commented Jul 5, 2019

Can confirm, no Git gutter's when using a symlinked path in Remote WSL (Though other Git features seem to work fine)
But if I navigate to the same path using /mnt/c and start up "code ." it all works fine.

@seanknox

This comment has been minimized.

Copy link
Member

@seanknox seanknox commented Sep 13, 2019

is the issue with the Remote SSH extension (and thus bugs/work should be tracked there) or with vscode itself?

@dulinux

This comment has been minimized.

Copy link

@dulinux dulinux commented Oct 8, 2019

Same issue here when working on a linked folder. If a open the target folder, it works. If a open the symbolic link 'folder', gutter annotations won´t work.

@Throne3d

This comment has been minimized.

Copy link

@Throne3d Throne3d commented Jan 25, 2020

Is there a way to recognize this from the extension, and perhaps provide an error in some log (like the VSCode "Show Git Output" log)? I don't know the internals work of these extensions work, but it took me a lot of Googling to find this error – the keyword I was missing was "gutter".

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.