Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Linking to git blame Page & Linking to Documentation Files like Org and Markdown Files on Bitbucket #83

Open
djgoku opened this issue Mar 23, 2021 · 2 comments

Comments

@djgoku
Copy link

djgoku commented Mar 23, 2021

Whenever using git-link on these files for GitHub/Bitbucket I usually have to use the blame/annotate url to link vs GitLab does the what I would expect.

https://gitlab.com/protesilaos/modus-themes/-/blob/main/README.md#L1-13 vs https://gitlab.com/protesilaos/modus-themes/-/blob/main/README.md

vs

https://github.com/sshaw/git-link/blob/master/README.md#L6-L11 (does nothing, other than open the link) vs https://github.com/sshaw/git-link/blame/master/README.md#L6-L11 links to and highlights lines 6-11.

vs

https://bitbucket.org/tutorials/markdowndemo/src/master/README.md?at=master#README.md-1:11 (does nothing, other than open the link) vs https://bitbucket.org/tutorials/markdowndemo/annotate/master/README.md?at=master#README.md-1:11

If I was wanting to add this feature where would be the best place to add this?

@sshaw
Copy link
Owner

sshaw commented Apr 1, 2021

Hi,

It sounds like there are a few things here. First bugs, for Org/Markdown files:

  • GitHub: linking to line numbers in does not work. This appears to be a GitHub bug because if you do it by hand the URL is the same. GitHub has fixed this.
  • Bitbucket: no longer support linking to line numbers (brilliant Atlassian) unless going through the blame page

Second, a new feature:

  • Linking to the blame page for a file which you're saying can be (or you want to be) a solution for the 2 items above

Is that correct?

@djgoku
Copy link
Author

djgoku commented Apr 2, 2021

  • GitHub: linking to line numbers in does not work. This appears to be a GitHub bug because if you do it by hand the URL is the same.
  • Bitbucket: no longer support linking to line numbers (brilliant Atlassian) unless going through the blame page

Yes, if I git-link on either an org-mode file or a Markdown file for GitHub/Bitbucket when opening the link it'll just open the file. If I use blame/annotate I can link to specific line numbers. This is a GitHub/Bitbucket specific issue.

  • Linking to the blame page for a file which you're saying can be (or you want to be) a solution for the 2 items above

Yes I want to write something to handle the above situations so I don't have to manually create the links.

@sshaw sshaw changed the title Documentation Files like Org and Markdown Files Support for Linking to git blame Page & Linking to Documentation Files like Org and Markdown Files on Bitbucket May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants