* Parse remotes as URLs or SCP-style paths
Instead of trying to strip on ':' and '/' to simplify a URL, actually
switch based on whether the remote path is a URL ("scheme://host:port/path")
or an SCP-style path (user@host:path) and parse them separately.
This allows us to handle custom ports in HTTP and HTTPS, but ignore
custom ports in an SSH url and HTTP remotes, instead of always upgrading
them to HTTPS.
* Introduce tests for Visual Studio Team Services
Add tests for Visual Studio Team Services (VSTS) and Team Foundation
Server (TFS). VSTS suggests remote paths in two formats: HTTPS URLs
or SSH URLs (including port number). TFS is an on-premises product
which - when running as an HTTP endpoint - defaults to port 8080.
* Branch selection in Visual Studio Team Services
VSTS and TFS URLs end in '/_git/RepositoryName` (with 0 or more leading
folders of hierarchy in front of that.) Detect these from the `_git` in
the penultimate folder of the path. Append branch information to VSTS
and TFS URLs.
Since VSTS and TFS use a query string to select a branch, instead of
including it in the server path, the `providerBranchRef` for other
services was changed to include the leading `/`, and now the `openurl`
and `providerBranchRef` are simply concatenated, to avoid an incorrect
trailing `/` for the VSTS and TFS branch URLs.
* Issues for Visual Studio Team Services
Provide issue support for VSTS and TFS, modifying the URL from the
`_git` endpoint to the `_workitems` endpoint and appending the `id`
query string.
* README: add VSTS and TFS support
This will make `ssh://git@<host>:<port>/<user>/<repo>` URLs
intermediately look like `git@<host>:<user>/<repo>` and
expose these to further processing/substitution.
Properties required for proper working are:
* `gitopen.gitlab.domain`
* `gitopen.gitlab.ssh.port`
The username prefix ‘username@bitbucket.org/*’ caused a phishing error
on Safari which persisted across page visits on BitBucket, unless the
username was manually deleted from url.