sshaw / git-link

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

Add support for Azure repositories #62

Closed r-darwish closed 5 years ago

sshaw commented 5 years ago

Hi, thanks for this nice addition. I'm excited to get it added.

When the repository is cloned via SSH the wrong URL is used. For example:

/tmp/Test >git remote -v
origin  s-shaw@vs-ssh.visualstudio.com:v3/s-shaw/Test/Test (fetch)
origin  s-shaw@vs-ssh.visualstudio.com:v3/s-shaw/Test/Test (push)

Results in:

https://vs-ssh.visualstudio.com/v3/s-shaw/Test/Test?path=foo.txt&version=GBmaster&line=2

Which results in a 404.

r-darwish commented 5 years ago

Hi, thanks for this nice addition. I'm excited to get it added.

When the repository is cloned via SSH the wrong URL is used. For example:

/tmp/Test >git remote -v
origin    s-shaw@vs-ssh.visualstudio.com:v3/s-shaw/Test/Test (fetch)
origin    s-shaw@vs-ssh.visualstudio.com:v3/s-shaw/Test/Test (push)

Results in:

vs-ssh.visualstudio.com/v3/s-shaw/Test/Test?path=foo.txt&version=GBmaster&line=2

Which results in a 404.

Good catch. I only checked HTTP. I'll probably need to add some kind on manipulation when the link is SSH. Could you tell me that is the HTTP URL of your repository? I think that the SSH user should replace vs-ssh

r-darwish commented 5 years ago

Thanks for replying quickly. I'll probably be able to commit the fixes in Sunday.

sshaw commented 5 years ago

Could you tell me that is the HTTP URL of your repository? I think that the SSH user should replace vs-ssh

https://s-shaw.visualstudio.com/Test

I think that the SSH user should replace vs-ssh

Makes sense.

r-darwish commented 5 years ago

@sshaw I pushed a commit which normalizes the SSH links. Sorry if my elisp is horrible. This is my first non-trivial contribution for an elisp package.

sshaw commented 5 years ago

Sorry if my elisp is horrible. This is my first non-trivial contribution for an elisp package.

Definitely not horrible but much appreciated.

See my latest comments. 2 other things:

  1. Can you squash into a single commit?
  2. Can you add all the forms of remote URLs to the test case?

Thanks!

r-darwish commented 5 years ago

Done 🙂

sshaw commented 5 years ago

Great, thanks so much!

sshaw commented 5 years ago

Released in v0.7.5