Browse Source

Fixes #528 - supports ~ in ssh path

main
Eric Amodio 6 years ago
parent
commit
532b9c01c7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/git/parsers/remoteParser.ts

+ 2
- 1
src/git/parsers/remoteParser.ts View File

@ -4,7 +4,7 @@ import { RemoteProvider } from '../remotes/factory';
import { GitRemote } from './../git';
const remoteRegex = /^(.*)\t(.*)\s\((.*)\)$/gm;
const urlRegex = /^(?:(git:\/\/)(.*?)\/|(https?:\/\/)(?:.*?@)?(.*?)\/|git@(.*):|(ssh:\/\/)(?:.*@)?(.*?)(?::.*?)?\/|(?:.*?@)(.*?):)(.*)$/;
const urlRegex = /^(?:(git:\/\/)(.*?)\/|(https?:\/\/)(?:.*?@)?(.*?)\/|git@(.*):|(ssh:\/\/)(?:.*@)?(.*?)(?::.*?)?(?:\/|(?=~))|(?:.*?@)(.*?):)(.*)$/;
// Test git urls
/*
@ -26,6 +26,7 @@ git://host.xz/~user/path/to/repo.git/
ssh://host.xz/project.git
ssh://host.xz/path/to/repo.git
ssh://host.xz/path/to/repo.git/
ssh://host.xz:~project.git
ssh://host.xz:port/path/to/repo.git/
ssh://user@host.xz/project.git
ssh://user@host.xz/path/to/repo.git

Loading…
Cancel
Save