Support for Linking to `git blame` Page & Linking to Documentation Files like Org and Markdown Files on Bitbucket
djgoku opened this issue · 5 comments
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?
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?
- 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.