Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When performing a Search Commit in a workspace with two or more Git repositories, the search function does not work in Untracked Files. #3784

Open
iblea opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working triage Needs to be looked at

Comments

@iblea
Copy link

iblea commented Nov 20, 2024

Description

Here's how to test it:

  1. First, create a workspace with a single Git repo. example workspace
{
"folders": [
    {
    "path": "./" // git project
    },
  ],
  "settings": {
  }
}
  1. Create an Untitled file through the Command Palette using the "File: New Untitled Text File" command.
  2. Focus the cursor on the created Untitled file and execute the "GitLens: Search Commits" command from the Command Palette.
  3. The search proceeds normally.

Image

  1. Now, create a workspace with two Git repos. example workspace
{
  "folders": [
    {
      "path": "./" // git project
    },
    {
      "path": "/Users/test/memo" // git project
    },
  ],
  "settings": {
  }
}

2~3. Follow steps 2 and 3 in the same way as above.
4. When executing the command, the search window does not appear.

GitLens Version

v16.0.2

VS Code Version

Visual Studio Code
Version: 1.95.3
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z (6 일 전)
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.95.3 Chrome/128.0.6613.186 Electron/32.2.1 Safari/537.36
Electron: 32.2.1
Node.js: 22.9.0
OS: MacOS 15.1(24B83)

Git Version

git version 2.39.5 (Apple Git-154)

Logs, Screenshots, Screen Captures, etc

No response

@iblea iblea added bug Something isn't working triage Needs to be looked at labels Nov 20, 2024
@iblea
Copy link
Author

iblea commented Nov 20, 2024

There is an issue occurring in src/git/gitProviderService.ts:2390 (getOrOpenRepository) where if no workspace result is found for the URI, it does not return Repository information.
This appears to be causing a problem where the repository window cannot be displayed in pickRepositoryStep.
I've attached a link to a sample code that I've modified for reference.

iblea/vscode-gitlens@235a74d
(If a repository is not found, add code to return repository information for the current project's root path.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be looked at
Projects
None yet
Development

No branches or pull requests

1 participant