diff options
author | Chief <admin@117.sh> | 2019-08-28 18:26:13 -0400 |
---|---|---|
committer | Chief <admin@117.sh> | 2019-08-28 18:26:13 -0400 |
commit | db0e226d48285a0ae8cda7db05d2ca20d9000dc6 (patch) | |
tree | 5008d5df1c14e2b82cdfa04461c9664d449de861 /internal | |
parent | 3e42b8cd3f20dad073db846348418aa218c7d23c (diff) | |
download | go-git-db0e226d48285a0ae8cda7db05d2ca20d9000dc6.tar.gz |
Add numeric username support for SSH urls.
Signed-off-by: Chief <admin@117.sh>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/url/url.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/url/url.go b/internal/url/url.go index 0f0d709..14cf133 100644 --- a/internal/url/url.go +++ b/internal/url/url.go @@ -6,7 +6,7 @@ import ( var ( isSchemeRegExp = regexp.MustCompile(`^[^:]+://`) - scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]{1,5})/)?(?P<path>[^\\].*)$`) + scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]{1,5})(?:\/|:))?(?P<path>[^\\].*\/[^\\].*)$`) ) // MatchesScheme returns true if the given string matches a URL-like |