Closed 117 closed 5 years ago
In my attempt to use SSH I discovered my username was being matched as the port ... this PR modifies the regex to allow for numeric usernames.
git@github.com:117/myrepo // 117 was being matched as the port
This new expression matches the following even when the username in the path is numerical.
git@github.com:james/example // user: git, host: github.com, path: james/example git@github.com:007/example // user: git, host: github.com, path: 007/example git@github.com:22:007/example // user: git, host: github.com, port: 22, path: 007/example git@github.com:22:james/example // user: git, host: github.com, port: 22, path: james/example
I tried to leave as much of the old expression as possible.
Signed-off-by: Chief admin@117.sh
Can you provide some tests?
Okay I have added tests.
Sorry but we use gocheck for the test :/
Ah, okay changed the test to use gocheck format.
In my attempt to use SSH I discovered my username was being matched as the port ... this PR modifies the regex to allow for numeric usernames.
This new expression matches the following even when the username in the path is numerical.
I tried to leave as much of the old expression as possible.
Signed-off-by: Chief admin@117.sh