gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
9.04k stars 1.35k forks source link

GitLens triggers unwanted repository detection through npm autodetect #3708

Open karolpiczak opened 3 weeks ago

karolpiczak commented 3 weeks ago

Description

Environment

Expected Behavior

With "git.autoRepositoryDetection": "openEditors", only repositories containing currently open editors should be detected and activated.

Actual Behavior

When a .json file is opened, npm autodetect triggers and causes GitLens to activate all repositories containing a package.json file, regardless of the git.autoRepositoryDetection setting.

Steps to Reproduce

  1. Set up a workspace with multiple git repositories/package.json files.
  2. Configure "git.autoRepositoryDetection": "openEditors", and "npm.autoDetect": "on".
  3. Open a .json file in any of the repositories.
  4. Observe that GitLens opens all repositories containing package.json files, even if they don't contain open editors.

Workaround

Setting "npm.autoDetect": "off" prevents the unwanted repository detection.

Additional Notes

GitLens Version

15.6.2

VS Code Version

Version: 1.95.0 Commit: 912bb683695358a54ae0c670461738984cbb5b95 Date: 2024-10-28T20:16:24.561Z Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.95.0 Chrome/128.0.6613.186 Electron/32.2.1 Safari/537.36

Git Version

git version 2.47.0

Logs, Screenshots, Screen Captures, etc

No response