소스 검색

Exposes isDiscoveringRepositories and has deep link service await it (#2886)

main
Ramin Tadayon 1 년 전
committed by GitHub
부모
커밋
b2bb4f85a5
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
2개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. +3
    -0
      src/git/gitProviderService.ts
  2. +8
    -0
      src/uris/deepLinks/deepLinkService.ts

+ 3
- 0
src/git/gitProviderService.ts 파일 보기

@ -582,6 +582,9 @@ export class GitProviderService implements Disposable {
private _discoveredWorkspaceFolders = new Map<WorkspaceFolder, Promise<Repository[]>>();
private _isDiscoveringRepositories: Promise<void> | undefined;
get isDiscoveringRepositories(): Promise<void> | undefined {
return this._isDiscoveringRepositories;
}
@log<GitProviderService['discoverRepositories']>({ args: { 0: folders => folders.length } })
async discoverRepositories(folders: readonly WorkspaceFolder[], options?: { force?: boolean }): Promise<void> {

+ 8
- 0
src/uris/deepLinks/deepLinkService.ts 파일 보기

@ -44,6 +44,10 @@ export class DeepLinkService implements Disposable {
if (link == null) return;
if (this._context.state === DeepLinkServiceState.Idle) {
if (this.container.git.isDiscoveringRepositories) {
await this.container.git.isDiscoveringRepositories;
}
if (!link.type || (!link.repoId && !link.remoteUrl && !link.repoPath)) {
void window.showErrorMessage('Unable to resolve link');
Logger.warn(`Unable to resolve link - missing basic properties: ${uri.toString()}`);
@ -126,6 +130,10 @@ export class DeepLinkService implements Disposable {
let action = DeepLinkServiceAction.OpenRepo;
if (this.container.git.isDiscoveringRepositories) {
await this.container.git.isDiscoveringRepositories;
}
if (pendingDeepLink.repoPath != null) {
const repoOpenUri = Uri.parse(pendingDeepLink.repoPath);
try {

불러오는 중...
취소
저장