ben-gibson / GitLink

A Jetbrains plugin that opens a local file under Git version control in its remote host using the default browser.
https://plugins.jetbrains.com/plugin/8183-gitlink
MIT License
671 stars 58 forks source link

Custom protocols incorrectly appear in url #294

Closed blaenk closed 1 year ago

blaenk commented 1 year ago

My git repo remote is:

xy://somedomain.com/somerepo.git

This nonstandard protocol is configured to work. The actual repo is on a self-hosted GitLab instance.

The link that GitLink produces is almost correct except it includes xy/ in it:

https://xy/somedomain.com/somerepo/somerepo/-/blob/somehash/some/sub/dir/SomeFile.java#L119-119

Notice the xy from the protocol is embedded in there at the beginning.

If I delete the xy/ text at the beginning, the link works perfectly.