vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Gitlens issues with multi-root workspaces that contain duplicate root folder names

Open rainecheck opened this issue 3 years ago • 0 comments


  • GitLens Version: v12.0.7
  • Git Version: 2.36.1
  • VSCode Version: Run 1.67.2 / c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 / x64
  • OS Version: macOS 11.6.6 (20G624)

Steps to Reproduce:

  1. Create workspace foo-workspace
{
  "folders": [
    {
      "path": "/Users/123456/git/123456/sample-site/"
    },
    {
      "path": "/Users/123456/git/123456/sample-site-dsl/"
    },
    {
      "path": "/Users/123456/git/FOO/sample-site/"
    },
    {
      "path": "/Users/123456/git/BAR/guidelines/"
    }
  ]
}

When you have two identically named folders in your workspace, Gitlens will only display up until the duplicate named folder in the Source Control panel (in this case 2 folders, not 2)

  1. Change line/folder name "path": "/Users/123456/git/FOO/sample-site/" to "path": "/Users/123456/git/FOO/_sample-site/" to make the 2nd folder name unique

Gitlens will not update the Source Control panel with the new information, as it has cached it somewhere.

  1. Change name of workspace to _foo-workspace

Gitlens now accurately shows 4 folders in the workspace in Source Control panel

  1. Change name of workspace back to foo-workspace

Gitlens goes back to only showing 2 folders in Source Control panel


I'm working around this by renaming folders and such, but thought I should report this to you folks.

rainecheck avatar May 27 '22 01:05 rainecheck