alexcorre / git-blame

Plugin for Atom Editor. Toggle git-blame annotations for the current file in the gutter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom repository url

ilopmar opened this issue · comments

Hi,

I'm trying your plugin and I think it's great. I'm using a custom repository url as my project is neither in github nor in bitbucket.

I've defined the custom url like this:

https://git.my-company.com/<%- project %>/<%- repo %>/commit/<%- revision %>

But when the url is opened in the browser the generated url is:

https://git.my-company.com///git@git.my-company.com:2222/group/repo-name/commit/c0a10505d58ef8563bf06fec9c7de05d61eaf9c2

As you can see the //git@git.my-company.com:2222/ is not right. If I remove this part from the url the link is generated correctly.

Is there any way I can define the custom url without the ssh url that I use to push to the repo?

Regards, Iván.

I think I know whats going on here. I think my RegExp in this line is not smart enough to parse out your group and repo name.

see: RemoteRevision.js#L52

I use the repository remote url from git remote -v to attempt to parse out the project (or some call it group) name and the repo name, but I didnt anticipate ports on the url.

I'm guessing your remote url looks something like...

git@git.my-company.com:2222:group/repo-name.git

I should have a fix for this pretty soon...

Can you give me an example or your remote url? so I can ensure it works?

Thank you for your quick reply.

My remote url is:

ssh://git@git.my-company.com:2222/group/repo-name.git

Published in v0.2.1 which should contain the fix.

I've updated the plugin and now it's working :-)

Thank you very much!

Regards, Iván.