sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
399 stars 74 forks source link

git link breaks on repositories accessed through custom port #32

Closed kbrooks closed 8 years ago

kbrooks commented 8 years ago

At my company we host our git repositories on gitlab and access them through port 2222. For example, the url config on one of our repositories is: url = ssh://git@gitlab.imshealth.com:2222/tools/ImsHealth.Automation.git

The function git-link--remote-host fails when there is a port, simply returning "2222".

https://github.com/sshaw/git-link/blob/master/git-link.el#L163

It should return "gitlab.imshealth.com".

kbrooks commented 8 years ago

I've started working on a fix for this issue

sshaw commented 8 years ago

Hey, actually I forgot all the URL styles that were supported (I really need to add some tests!) so that didn't work either 😿 but checkout this branch and let me if that fixes it.

Thanks.

kbrooks commented 8 years ago

That works for me

sshaw commented 8 years ago

Fixed in v0.4.2.