-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
Comparing References fails if the same reference-to-reference comparison is selected for two different git repositories in a vscode workspace.
Environment
- VSCode workspace with multiple git repositories
- Search & Compare separated into the GitLens Inspect tab (rather than the Source Control tab)
Action attempted
- New Search or Compare
- Compare References...
- Repo selected =
repo_A - Reference 1 selected =
master(branch name) - Reference 2 selected =
dev(branch name)
- New Search or Compare
- Compare References...
- Repo selected =
repo_B - Reference 1 selected =
master(branch name) - Reference 2 selected =
dev(branch name)
Note: This error occurs no matter the specific references nor repos, as long as the two references chosen share the same exact names between the two requests.
Error
After second "New Search or Compare" added, the following error pops up.
Additionally, all entries under the SEARCH & COMPARE tab/view disappear. User must "Clear Results" and start over in order to clear the error and use this feature again as usual.
Expected result
The SEARCH & COMPARE feature should be able to handle the results of these two separate requests just like any other
Suspected Fix
It appears as though the different results are kept track of via IDs that only take into account the two reference points. Therefore even with two different repositories, if the same exact references are selected, the IDs clash.
If the repo name itself is included in the ID, this collision should not occur.
(This is a casual guess based off of no knowledge of the inner workings of this feature of this extension.)
GitLens Version
17.6.2
VS Code Version
Version: 1.105.1 (system setup)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
Git Version
git version 2.51.2.windows.1
Logs, Screenshots, Screen Captures, etc
gitlens_searchAndCompare_output_3.log
Changes made to the log:
- Replaced the names of some folder / repo references
Attempted Reference Comparisons shown in log:
- repo_A then repo_B:
master..dev - repo_B then repo_A:
Working Tree..dev - repo_A then repo_B:
HEAD..serial_manager