From 78bb6ef8038e02e755960b60c4ef0edea40662bf Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 19 Feb 2018 01:09:31 -0500 Subject: [PATCH] Searches versioned files when getting a repo path --- src/gitService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gitService.ts b/src/gitService.ts index fad5cdf..cf45986 100644 --- a/src/gitService.ts +++ b/src/gitService.ts @@ -1120,6 +1120,11 @@ export class GitService extends Disposable { const repo = await this.getRepository(filePathOrUri, { ...options, skipCacheUpdate: true }); if (repo !== undefined) return repo.path; + if (typeof filePathOrUri !== 'string') { + const versionedUri = await Container.git.getVersionedUri(filePathOrUri); + if (versionedUri !== undefined) return versionedUri.repoPath; + } + const rp = await this.getRepoPathCore(typeof filePathOrUri === 'string' ? filePathOrUri : filePathOrUri.fsPath, false); if (rp === undefined) return undefined;