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

Inline blame does not work on Windows when the workspace was opened through a virtual drive (subst command)

Open vjalle opened this issue 3 years ago • 12 comments

Description

The issue happens on both Win10 and Win11, all versions. Created virtual drives with the subst command for the project folders. Opening the Code workspace through the virtual drive causes problems for the GitLens plugin.

  1. If the workspace is opened through the long path, not using the virtual drives, GitLens works properly. Files opened from the Source Control view by right-clicking and selecting Open File and files opened from Explorer (or ctrl-p) are recognized as the same file. E.g., I open a file from the Source Control view, switch to another editor tab and then try to open the same file from Explorer, the previously opened file is activated. When I hover the mouse on the editor tab, I can see the absolute path to the file in Windows format. Below that (breadcrumbs?) there is the workspace relative path displayed. GitLens and ErrorLens messages are nicely combined, both messages are shown with the proper color.

  2. When using the virtual drive, operation is weird:

  • There is inline blame info in the diff editor (click a changed file in the Source Control view and then click into the file)
  • There is inline blame, if a file is opened for editing from the Source Control view by right clicking and then Open File. The inline errors from ErrorLens are not displayed.
  • There is no inline blame if the file is opened in any other way (Explorer, ctrl-P etc...). ErrorLens works.

If a file was opened from the Source Control view, both hover and breadcrumbs show absolute Windows path to the file. The file can be opened once again from the Explorer or through control-P, and Code does not seem to recognize that they're the same file! For the second file, hover shows the absolute path to the file through the virtual drive in POSIX format, and below that the breadcrumbs show the workspace relative path. Very different from the same file opened through Source Control.

The issue might be with Code itself. (?)

GitLens Version

12.1.2

VS Code Version

Version: 1.70.2 (system setup) Commit: e4503b30fc78200f846c62cf8091b76ff5547662 Date: 2022-08-16T05:35:13.448Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Windows_NT x64 10.0.22000

Git Version

git version 2.37.1.windows.1

Logs, Screenshots, Screen Captures, etc

No response

vjalle avatar Aug 29 '22 20:08 vjalle

i also see this issue.

jmiguelhdez avatar Oct 07 '22 21:10 jmiguelhdez

I can also recreate this behaviour.

tozzil avatar Nov 22 '22 08:11 tozzil

The same problem with Git Lens v13.2.0

he1f avatar Dec 25 '22 09:12 he1f

In my case I'm creating those drives with the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices trick so that those drives are persisted between reboots.

yvesdolc avatar Jan 31 '23 20:01 yvesdolc

I observed the same problem - an absolute path is used instead of a relative path when a directory within a subst'd drive is opened in VSCode - in regard to the GitLab integration. When the "Copy Remote File URL" option from a file's context menu is used then the copied URL is:

${protocol}://${domain}/${repo}/-/blob/${branch}/drive:/absolute/path/to/file

instead of:

${protocol}://${domain}/${repo}/-/blob/${branch}/relative/path/to/file

pawelszramowski avatar Jul 18 '23 10:07 pawelszramowski

Can you please add more detail as to the issue you are experiencing and/or the steps to reproduce it? And please make sure to be using the latest version of GitLens 14.1.1 or the latest pre-release version.

Also, if this issue is reproducible, can you please enable debug logging by running from GitLens: Enable Debug Logging from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens and GitLens (Git) channel in the Output pane.

Once enabled, please reproduce the issue, and attach the log from the both GitLens and GitLens (Git) channels.

Thank you!

eamodio avatar Jul 18 '23 22:07 eamodio

@eamodio, this likley has the same root cause as https://github.com/microsoft/vscode/issues/100274 you've participated in too: git returns the resolved path of the drive (symbolic links are affected too) since version 2.25.0.

d:\dev>git --version
git version 2.41.0.windows.2

d:\dev>code --version
1.80.1
74f6148eb9ea00507ec113ec51c489d6ffb4b771
x64

d:\dev>code --list-extensions --show-versions | grep gitlens
[email protected]

d:\dev>git clone https://github.com/gitkraken/vscode-gitlens.git >NUL 2>&1

d:\dev>SUBST g: .

d:\dev>git -C .\vscode-gitlens rev-parse --show-toplevel
d:/dev/vscode-gitlens

d:\dev>git -C g:\vscode-gitlens rev-parse --show-toplevel
d:/dev/vscode-gitlens

Note the output of the last command is not g:/vscode-gitlens.

Now, if you run code .\vscode-gitlens then the blame, remote provider integration, etc. all work correctly:

  • Value copied by "Copy Remote File URL" context menu option for README.md: https://github.com/gitkraken/vscode-gitlens/blob/5094f5b1cdaa36eb914bc880baae614991404583/README.md

  • GitLens output:

[2023-07-18 23:40:22.252] [   5d] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.252] [   5e] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.252] [   5f] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.252] [   5f] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:22.253] [   5e] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:22.253] [   5d] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [1ms]
[2023-07-18 23:40:22.253] [   60] GitProviderService.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true})
[2023-07-18 23:40:22.253] [   61] LocalGitProvider.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true})
[2023-07-18 23:40:22.254] [   62] LocalGitProvider.getLogForFile(e=d:/dev/vscode-gitlens, t=README.md, i={"limit":2})
[2023-07-18 23:40:22.344] [   63] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.344] [   64] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.344] [   65] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:22.344] [   65] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:22.345] [   64] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [1ms]
[2023-07-18 23:40:22.345] [   63] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [1ms]
[2023-07-18 23:40:22.345] [   66] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:40:22.346] [   66] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:22.346] [   67] LocalGitProvider.isTrackedPrivate(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:40:22.346] [   68] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:40:22.346] [   68] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:22.346] [   69] LocalGitProvider.isTrackedCore(e=d:/dev/vscode-gitlens/README.md, t=README.md, i=d:/dev/vscode-gitlens, s=undefined, o=W(d:/dev/vscode-gitlens))
[2023-07-18 23:40:28.442] [   6a] GitProviderService.onWindowStateChanged(e=focused=false)
[2023-07-18 23:40:28.443] [   6a] GitProviderService.onWindowStateChanged(e=focused=false) completed [0ms]
[2023-07-18 23:40:28.487] [GIT  ] [d:/dev/vscode-gitlens] git ls-files -- README.md [*6140ms] (slow)
[2023-07-18 23:40:28.487] [   69] LocalGitProvider.isTrackedCore(e=d:/dev/vscode-gitlens/README.md, t=README.md, i=d:/dev/vscode-gitlens, s=undefined, o=W(d:/dev/vscode-gitlens)) completed [*6141ms] (slow)
[2023-07-18 23:40:28.488] [   67] LocalGitProvider.isTrackedPrivate(e=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned true [*6141ms] (slow)
[2023-07-18 23:40:28.488] [   62] LocalGitProvider.getLogForFile Cache miss: 'log:n2'
[2023-07-18 23:40:28.488] [   6b] LocalGitProvider.isTrackedPrivate(e=README.md, t=d:/dev/vscode-gitlens, i=undefined)
[2023-07-18 23:40:28.488] [   6c] GitProviderService.getRepository(e=Uri(file:///README.md))
[2023-07-18 23:40:28.489] [   6c] GitProviderService.getRepository(e=Uri(file:///README.md)) returned undefined [0ms]
[2023-07-18 23:40:28.489] [   62] LocalGitProvider.getLogForFile Cache add: 'log:n2'
[2023-07-18 23:40:28.489] [   6b] LocalGitProvider.isTrackedPrivate(e=README.md, t=d:/dev/vscode-gitlens, i=undefined) returned true [0ms]
[2023-07-18 23:40:28.617] [GIT  ] [d:/dev/vscode-gitlens] git log --format=%x3c%x2ff%x3e%n%x3cr%x3e%x20%H%n%x3ca%x3e%x20%aN%n%x3ce%x3e%x20%aE%n%x3cd%x3e%x20%at%n%x3cn%x3e%x20%cN%n%x3cm%x3e%x20%cE%n%x3cc%x3e%x20%ct%n%x3cp%x3e%x20%P%n%x3cs%x3e%n%B%n%x3c%x2fs%x3e%n%x3cf%x3e -n3 -m --numstat --summary -- README.md [126ms]
[2023-07-18 23:40:28.618] [   6d] LocalGitProvider.getCurrentUser(e=d:/dev/vscode-gitlens)
[2023-07-18 23:40:29.130] [GIT  ] [d:/dev/vscode-gitlens] git config --get-regex ^user\. [*511ms] (slow)
[2023-07-18 23:40:29.244] [GIT  ] [d:/dev/vscode-gitlens] git check-mailmap  [113ms]
[2023-07-18 23:40:29.244] [   6d] LocalGitProvider.getCurrentUser(e=d:/dev/vscode-gitlens) completed [*626ms] (slow)
[2023-07-18 23:40:29.245] [   6e] re.parse
[2023-07-18 23:40:29.247] [   6e] re.parse completed [1ms]
[2023-07-18 23:40:29.247] [   62] LocalGitProvider.getLogForFile(e=d:/dev/vscode-gitlens, t=README.md, i={"limit":2}) completed [*6993ms] (slow)
[2023-07-18 23:40:29.247] [   61] LocalGitProvider.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true}) completed [*6993ms] (slow)
[2023-07-18 23:40:29.247] [   60] GitProviderService.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true}) completed [*6994ms] (slow)
[2023-07-18 23:40:29.248] [   6f] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:29.248] [   70] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:29.248] [   71] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md))
[2023-07-18 23:40:29.248] [   71] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:29.249] [   70] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:29.249] [   6f] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/README.md)) returned GitUri(file:///d:/dev/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [1ms]
[2023-07-18 23:40:29.250] [   72] GitProviderService.getRemotesWithProviders(e=d:/dev/vscode-gitlens)
[2023-07-18 23:40:29.250] [   73] GitProviderService.getRepository(e=d:/dev/vscode-gitlens)
[2023-07-18 23:40:29.250] [   73] GitProviderService.getRepository(e=d:/dev/vscode-gitlens) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:40:29.250] [   72] GitProviderService.getRemotesWithProviders(e=d:/dev/vscode-gitlens) completed [0ms]
  • GitLens (Git) output:
[2023-07-18 23:39:54.211] [    432ms] [d:\dev\vscode-gitlens] git rev-parse --show-toplevel
[2023-07-18 23:39:54.614] [    372ms] [d:/dev/vscode-gitlens] git rev-parse --git-dir --git-common-dir
[2023-07-18 23:39:54.633] [    341ms] [d:/dev/vscode-gitlens] git remote -v
[2023-07-18 23:39:57.349] [     80ms] [d:/dev/vscode-gitlens] git remote -v
[2023-07-18 23:40:28.487] [*  6140ms] [d:/dev/vscode-gitlens] git ls-files -- README.md
[2023-07-18 23:40:28.617] [    126ms] [d:/dev/vscode-gitlens] git log --format=%x3c%x2ff%x3e%n%x3cr%x3e%x20%H%n%x3ca%x3e%x20%aN%n%x3ce%x3e%x20%aE%n%x3cd%x3e%x20%at%n%x3cn%x3e%x20%cN%n%x3cm%x3e%x20%cE%n%x3cc%x3e%x20%ct%n%x3cp%x3e%x20%P%n%x3cs%x3e%n%B%n%x3c%x2fs%x3e%n%x3cf%x3e -n3 -m --numstat --summary -- README.md

But not if you run code g:\vscode-gitlens:

  • The copied URL: https://github.com/gitkraken/vscode-gitlens/blob/5094f5b1cdaa36eb914bc880baae614991404583/g:/vscode-gitlens/README.md

  • GitLens output:

[2023-07-18 23:49:01.231] [   67] y.fromUri(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.232] [   68] GitProviderService.getOrOpenRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.232] [   69] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.232] [   69] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned undefined [0ms]
[2023-07-18 23:49:01.234] [   6a] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.234] [   6a] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned undefined [0ms]
[2023-07-18 23:49:01.236] [   6b] LocalGitProvider.findRepositoryUri(e=Uri(file:///g:/vscode-gitlens/README.md), t=undefined)
[2023-07-18 23:49:01.489] [GIT  ] [g:\vscode-gitlens] git rev-parse --show-toplevel [236ms]
[2023-07-18 23:49:01.503] [   6b] LocalGitProvider.findRepositoryUri No symlink detected; repoPath=d:/dev/vscode-gitlens
[2023-07-18 23:49:01.504] [   6b] LocalGitProvider.findRepositoryUri(e=Uri(file:///g:/vscode-gitlens/README.md), t=undefined) completed [267ms]
[2023-07-18 23:49:01.505] [   68] GitProviderService.getOrOpenRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [273ms]
[2023-07-18 23:49:01.505] [   67] y.fromUri(e=Uri(file:///g:/vscode-gitlens/README.md)) returned GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [273ms]
[2023-07-18 23:49:01.506] [   6c] GitProviderService.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true})
[2023-07-18 23:49:01.506] [   6d] LocalGitProvider.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true})
[2023-07-18 23:49:01.507] [   6e] LocalGitProvider.getLogForFile(e=d:/dev/vscode-gitlens, t=g:/vscode-gitlens/README.md, i={"limit":2})
[2023-07-18 23:49:01.618] [   6f] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.618] [   70] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.618] [   71] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.618] [   71] GitProviderService.getRepository(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:49:01.621] [   70] GitProviderService.getOrOpenRepository(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [2ms]
[2023-07-18 23:49:01.621] [   6f] y.fromUri(e=Uri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md)) returned GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [3ms]
[2023-07-18 23:49:01.622] [   72] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:49:01.622] [   72] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:49:01.622] [   73] LocalGitProvider.isTrackedPrivate(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:49:01.622] [   74] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens))
[2023-07-18 23:49:01.622] [   74] GitProviderService.getRepository(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:49:01.623] [   75] LocalGitProvider.isTrackedCore(e=d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md, t=g:/vscode-gitlens/README.md, i=d:/dev/vscode-gitlens, s=undefined, o=W(d:/dev/vscode-gitlens))
[2023-07-18 23:49:01.941] [GIT  ] [d:/dev/vscode-gitlens] git ls-files -- g:/vscode-gitlens/README.md [317ms]
[2023-07-18 23:49:01.942] [   75] LocalGitProvider.isTrackedCore(e=d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md, t=g:/vscode-gitlens/README.md, i=d:/dev/vscode-gitlens, s=undefined, o=W(d:/dev/vscode-gitlens)) completed [318ms]
[2023-07-18 23:49:01.942] [   73] LocalGitProvider.isTrackedPrivate(e=GitUri(file:///d:/dev/vscode-gitlens/g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens)) returned true [320ms]
[2023-07-18 23:49:01.944] [   6e] LocalGitProvider.getLogForFile Cache miss: 'log:n2'
[2023-07-18 23:49:01.946] [   76] LocalGitProvider.isTrackedPrivate(e=g:/vscode-gitlens/README.md, t=d:/dev/vscode-gitlens, i=undefined)
[2023-07-18 23:49:01.946] [   77] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:01.946] [   77] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned undefined [0ms]
[2023-07-18 23:49:01.947] [   6e] LocalGitProvider.getLogForFile Cache add: 'log:n2'
[2023-07-18 23:49:01.949] [   76] LocalGitProvider.isTrackedPrivate(e=g:/vscode-gitlens/README.md, t=d:/dev/vscode-gitlens, i=undefined) returned true [2ms]
[2023-07-18 23:49:02.274] [GIT  ] [d:/dev/vscode-gitlens] git log --format=%x3c%x2ff%x3e%n%x3cr%x3e%x20%H%n%x3ca%x3e%x20%aN%n%x3ce%x3e%x20%aE%n%x3cd%x3e%x20%at%n%x3cn%x3e%x20%cN%n%x3cm%x3e%x20%cE%n%x3cc%x3e%x20%ct%n%x3cp%x3e%x20%P%n%x3cs%x3e%n%B%n%x3c%x2fs%x3e%n%x3cf%x3e -n3 -m --numstat --summary -- g:/vscode-gitlens/README.md [323ms]
[2023-07-18 23:49:02.275] [   78] LocalGitProvider.getCurrentUser(e=d:/dev/vscode-gitlens)
[2023-07-18 23:49:02.545] [GIT  ] [d:/dev/vscode-gitlens] git config --get-regex ^user\. [267ms]
[2023-07-18 23:49:02.811] [GIT  ] [d:/dev/vscode-gitlens] git check-mailmap  [264ms]
[2023-07-18 23:49:02.813] [   78] LocalGitProvider.getCurrentUser(e=d:/dev/vscode-gitlens) completed [*537ms] (slow)
[2023-07-18 23:49:02.813] [   79] re.parse
[2023-07-18 23:49:02.823] [   79] re.parse completed [9ms]
[2023-07-18 23:49:02.825] [   6e] LocalGitProvider.getLogForFile(e=d:/dev/vscode-gitlens, t=g:/vscode-gitlens/README.md, i={"limit":2}) completed [*1318ms] (slow)
[2023-07-18 23:49:02.826] [   6d] LocalGitProvider.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true}) completed [*1319ms] (slow)
[2023-07-18 23:49:02.826] [   6c] GitProviderService.getCommitForFile(e=d:/dev/vscode-gitlens, t=GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens), i={"firstIfNotFound":true}) completed [*1320ms] (slow)
[2023-07-18 23:49:02.828] [   7a] y.fromUri(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:02.829] [   7b] GitProviderService.getOrOpenRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:02.829] [   7c] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:02.829] [   7c] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned undefined [0ms]
[2023-07-18 23:49:02.832] [   7d] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md))
[2023-07-18 23:49:02.833] [   7d] GitProviderService.getRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned undefined [0ms]
[2023-07-18 23:49:02.835] [   7b] GitProviderService.getOrOpenRepository(e=Uri(file:///g:/vscode-gitlens/README.md)) returned W(d:/dev/vscode-gitlens) [6ms]
[2023-07-18 23:49:02.836] [   7a] y.fromUri(e=Uri(file:///g:/vscode-gitlens/README.md)) returned GitUri(file:///g:/vscode-gitlens/README.md repoPath=d:/dev/vscode-gitlens) [7ms]
[2023-07-18 23:49:02.836] [   7e] GitProviderService.getRemotesWithProviders(e=d:/dev/vscode-gitlens)
[2023-07-18 23:49:02.837] [   7f] GitProviderService.getRepository(e=d:/dev/vscode-gitlens)
[2023-07-18 23:49:02.837] [   7f] GitProviderService.getRepository(e=d:/dev/vscode-gitlens) returned W(d:/dev/vscode-gitlens) [0ms]
[2023-07-18 23:49:02.840] [   7e] GitProviderService.getRemotesWithProviders(e=d:/dev/vscode-gitlens) completed [3ms]
  • GitLens (Git) output:
[2023-07-18 23:48:09.101] [*   700ms] [g:\vscode-gitlens] git rev-parse --show-toplevel
[2023-07-18 23:48:09.423] [    304ms] [d:/dev/vscode-gitlens] git rev-parse --git-dir --git-common-dir
[2023-07-18 23:48:09.467] [    285ms] [g:\vscode-gitlens] git rev-parse --show-toplevel
[2023-07-18 23:48:09.589] [    115ms] [d:/dev/vscode-gitlens] git remote -v
[2023-07-18 23:48:09.589] [    103ms] [d:/dev/vscode-gitlens] git remote -v (waited)
[2023-07-18 23:48:10.590] [     94ms] [d:/dev/vscode-gitlens] git remote -v
[2023-07-18 23:49:01.489] [    236ms] [g:\vscode-gitlens] git rev-parse --show-toplevel
[2023-07-18 23:49:01.941] [    317ms] [d:/dev/vscode-gitlens] git ls-files -- g:/vscode-gitlens/README.md
[2023-07-18 23:49:02.274] [    323ms] [d:/dev/vscode-gitlens] git log --format=%x3c%x2ff%x3e%n%x3cr%x3e%x20%H%n%x3ca%x3e%x20%aN%n%x3ce%x3e%x20%aE%n%x3cd%x3e%x20%at%n%x3cn%x3e%x20%cN%n%x3cm%x3e%x20%cE%n%x3cc%x3e%x20%ct%n%x3cp%x3e%x20%P%n%x3cs%x3e%n%B%n%x3c%x2fs%x3e%n%x3cf%x3e -n3 -m --numstat --summary -- g:/vscode-gitlens/README.md

pawelszramowski avatar Jul 19 '23 00:07 pawelszramowski

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!

github-actions[bot] avatar Jul 26 '23 05:07 github-actions[bot]

@eamodio, please remove the needs-more-info label.

pawelszramowski avatar Jul 26 '23 09:07 pawelszramowski

This issue is still ongoing.

unbolt avatar Mar 18 '24 12:03 unbolt

I have the same problem but the other way round:

  • New machine
  • Created a devdrive
  • added a junction with the "legacy" path, so I don't have to reconfigure my vscode with all the new project paths
  • Inline blame doesn't work whn I open the project with the legacy path

This is a known "problem" on the git-for-windows repo: https://github.com/git-for-windows/git/issues/2705 Can this be fixed on the gitlens side?

dannoe avatar Feb 06 '25 16:02 dannoe

So Vscode introduced some changes in v1.99 (As said here: https://github.com/microsoft/vscode/issues/100274#issuecomment-2725219133)in which they claim to have fixed the issues with subst drives. And while Git in Vscode does seem to be fixed, or at least still works as intended, I can see that Gitlens does not. There are still no inline Blames and when I open the Gitlens logs I get Errors such like:

EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat 'c:\original\path\to\repo\submodule\c:\original\path\to\repo\submodule\x:\repo\submodule\path\to\file.cpp'

Notice, that there are three paths in the string. First two are the original paths to the repository and the third is the correct subst path to the file. Why are there three paths connected?

jonaskappa avatar May 09 '25 09:05 jonaskappa