Steps to Reproduce:
git lens functionality won't be available in foo, git works fine in the console though.
I guess it's not that surprising but it would be nice if it would work and I didn't expect it to cause issues.
@AndreasPK What doesn't work? I've tried it and everything I've tried seems to work for me.
While writing up more details I found the issue. It's not really related to git lens but to msys git versus git on windows
What doesn't work?
The folder was not recognized as git repository.
In a regular git tree everything worked:

If I open a worktree in VSCode it's not recognized as a git repo at all.

I usually use a msys shell there it works fine:
Andi@Horzube MINGW64 /e/ghc_wio_settings
$ git --version
git version 2.25.1
Andi@Horzube MINGW64 /e/ghc_wio_settings
$ git status
On branch ...
Your branch is ahead of '.../...' by 7 commits.
(use "git push" to publish your local commits)
However it doesn't work for the windows version of git. Executed in git bash:
Andi@Horzube MINGW64 /e/ghc_wio_settings
$ git --version
git version 2.26.0.windows.1
Andi@Horzube MINGW64 /e/ghc_wio_settings
$ git status
fatal: not a git repository: /e/ghc/.git/worktrees/ghc_wio_settings
Turns out the issue is I added the worktree under msys which used a linux-style path: /e/ghc/.git/worktrees/ghc_wio_settings
Rewriting it to a windows-style path by hand fixed the issue.
$ cat .git
gitdir: E:\\ghc\\.git\\worktrees\\ghc_wio_settings
Now everything works as expected. I hope this is useful if someone runs into the same issue in the future.
Similar problem with the Remote:SSH plugin. Solved by changing gitdir to use a relative path.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
While writing up more details I found the issue. It's not really related to git lens but to msys git versus git on windows
The folder was not recognized as git repository.
In a regular git tree everything worked:
If I open a worktree in VSCode it's not recognized as a git repo at all.
I usually use a msys shell there it works fine:
However it doesn't work for the windows version of git. Executed in git bash:
Turns out the issue is I added the worktree under msys which used a linux-style path:
/e/ghc/.git/worktrees/ghc_wio_settingsRewriting it to a windows-style path by hand fixed the issue.
Now everything works as expected. I hope this is useful if someone runs into the same issue in the future.