diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 4a968792a77..f2b9100d79a 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -502,7 +502,7 @@ export class Git { const repoUri = Uri.file(repositoryRootPath); const pathUri = Uri.file(pathInsidePossibleRepository); if (repoUri.authority.length !== 0 && pathUri.authority.length === 0) { - const match = /(?<=^\/?)([a-zA-Z])(?=:\/)/.exec(pathUri.path); + const match = /^[\/]?([a-zA-Z])[:\/]/.exec(pathUri.path); if (match !== null) { const [, letter] = match;