Skip to content

Source Control views disappear after opening a file beyond a symbolic link #2615

@jcready

Description

@jcready

Description

  1. Bazel generates files during build and outputs them to an external folder
  2. That folder is accessible inside the repo folder via symlinks
  3. Those symlinked folders are in our .gitignore file
  4. We open one of the files inside the symlinked folder (via Go To Definition)
  5. All of the gitlens source control views disappear

This is the symlinked directory: /home/me/repo/bazel-out

Inside /home/me/repo/.gitignore we have:

/bazel-*

In the extension host output there are several lines like this (I am assuming this is related):

2023-03-31 13:02:01.838 [error] {"message":"Git error","stdout":"","stderr":"fatal: pathspec '/home/me/repo/bazel-out/k8-opt/bin/other/folders/deep/inside/symlinked/directory/file.ext' is beyond a symbolic link\n","exitCode":128}

Even after closing the editor tab for the symlinked file (and focusing back on an editor tab which is formally part of the git repo) we are unable to restore the GitLens source control views.

Trying to run GitLens: Open Source Control from the command palette results in an error:

Command 'GitLens: Open Source Control' resulted in an error
command 'gitlens.graph.openSCM' not found

The only way to restore the GitLens source control views is to run Developer: Reload Window from the command palette.

GitLens Version

13.4.0

VS Code Version

Version: 1.77.0
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T09:57:11.797Z (2 days ago)
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin x64 22.1.0
Sandboxed: No

Git Version

git version 2.32.0

Logs, Screenshots, Screen Captures, etc

image

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions