-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple protocols and ports for a single GitRemote
server and build URIs
#4429
Support multiple protocols and ports for a single GitRemote
server and build URIs
#4429
Conversation
GitRemote
serverGitRemote
server and build URIs
public Parser registerRemote(Service service, String origin) { | ||
if (origin.startsWith("https://") || origin.startsWith("http://") || origin.startsWith("ssh://")) { | ||
origin = new Parser.HostAndPath(origin).concat(); | ||
public URI toUri(GitRemote remote, boolean ssh) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to change the ssh
parameter to protocol
to allow for http
or https
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not think it was very useful, but it's easy to add now, harder to change later. So lets!
What's changed?
In stead of manipulating URIs and matching on a simple origin, we now register multiple URIs for a remote git server. This way we can indicate the multiple protocols/ports indeed point to the same server.
What's your motivation?
We can currently get multiple origins for the same server which means we could fail to match.
Anything in particular you'd like reviewers to focus on?
the
normalizeUri
methodAnyone you would like to review specifically?
@bryceatmoderne
Checklist