aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/common.go
diff options
context:
space:
mode:
authorJ. Fernando Sánchez <balkian@gmail.com>2017-09-28 18:05:55 +0200
committerJ. Fernando Sánchez <balkian@gmail.com>2017-09-28 18:05:55 +0200
commit0ddf8f55a4afbe4d56bbd3fc8546622f7b9b1872 (patch)
tree01dfffe8aa9f45eb962e22d6cab96fcf0a905767 /plumbing/transport/common.go
parent04765bb11cbadf22ed01ea12cb6f2834e9ee1ec5 (diff)
downloadgo-git-0ddf8f55a4afbe4d56bbd3fc8546622f7b9b1872.tar.gz
Fixed SCP regex
URLs should be user@server:port/path instead of user@server:port:path
Diffstat (limited to 'plumbing/transport/common.go')
-rw-r--r--plumbing/transport/common.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/transport/common.go b/plumbing/transport/common.go
index 202c498..ac71bb3 100644
--- a/plumbing/transport/common.go
+++ b/plumbing/transport/common.go
@@ -227,7 +227,7 @@ func (e *fileEndpoint) String() string { return e.path }
var (
isSchemeRegExp = regexp.MustCompile(`^[^:]+://`)
- scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]+):)?(?P<path>[^\\].*)$`)
+ scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P<user>[^@]+)@)?(?P<host>[^:\s]+):(?:(?P<port>[0-9]{1,5})/)?(?P<path>[^\\].*)$`)
)
func parseSCPLike(endpoint string) (Endpoint, bool) {