Quellcode durchsuchen

Fixes #87 - Can't open files in remote when using git@ urls (ssh)

main
Eric Amodio vor 7 Jahren
Ursprung
Commit
10674124c8
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      src/git/remotes/factory.ts

+ 2
- 2
src/git/remotes/factory.ts Datei anzeigen

@ -15,7 +15,7 @@ const providerMap = new Map RemoteProv
['visualstudio.com', (domain: string, path: string) => new VisualStudioService(domain, path)]
]);
const UrlRegex = /^(?:git:\/\/(.*?)\/|https:\/\/(.*?)\/|http:\/\/(.*?)\/|git@(.*):\/\/|ssh:\/\/git@(.*?)\/)(.*)$/;
const UrlRegex = /^(?:git:\/\/(.*?)\/|https:\/\/(.*?)\/|http:\/\/(.*?)\/|git@(.*):|ssh:\/\/(?:.*@)?(.*?)(?::.*?)?\/)(.*)$/;
export class RemoteProviderFactory {
@ -25,7 +25,7 @@ export class RemoteProviderFactory {
if (match == null) return undefined;
const domain = match[1] || match[2] || match[3] || match[4] || match[5];
const path = match[6].replace(/\.git/, '');
const path = match[6].replace(/\.git\/?$/, '');
const key = domain.toLowerCase().endsWith('visualstudio.com')
? 'visualstudio.com'

Laden…
Abbrechen
Speichern