sshaw / git-link

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

Add variable to allow the recognition of vc names #53

Closed colonelpanic8 closed 6 years ago

colonelpanic8 commented 6 years ago

Fixes #52

sshaw commented 6 years ago

Hi, thanks for the PR. I am excited about this addition but see my comments on 77202b5.

As I mentioned here, this will generate a link with the revision in it. For example:

https://github.com/sshaw/class2/blob/master/Changes.~c8096a9f88d9567b13c21d3b946f36385d58c03a~#L7

This results in a 404.

The correct version would be to set the proper variables here.

colonelpanic8 commented 6 years ago

@sshaw The other major issue is that vc won't necessary always use the full sha when creating the relevant buffer, so I think we will need to do some type of resolution on the ref that appears in between .~ .~

sshaw commented 6 years ago

The other major issue is that vc won't necessary always use the full sha

That's fine. .~REV~ can be a tag, branch or SHA. As long as we take the REV part and pass it to the linking function we should be okay. All supported services can handle this.

sshaw commented 6 years ago

Closing in lieu of 5d40a13.