#2154 RFE: link to blob at version
Opened 7 years ago by lsedlar. Modified a year ago

When I need to refer to particular line in code, I click Files at the top, navigate to file and highlight a line. That gives me the URL to share and it looks like this: https://pagure.io/pungi/blob/master/f/pungi/compose.py#_358-384

However it points to those lines in whatever happens to be the version of the file on master branch, so a commit can easily break the link (make it point to wrong lines).

It's possible to navigate to the url with hash instead of branch name, but it's a little more involved. The way I know of is: Commits, click the latest one, tree, and then navigate to file and line.

It would be cool if there was a way to turn the branch in url from branch to hash in an easier way.

Github does it with y keyboard shortcut, which I think is really undiscoverable. Maybe something like this:

Snimek_z_2017-03-23_12-02-12.png

It would point to the same page but with branch name replaced with corresponding commit hash.

Or is there already a better way to get the link I want?


Metadata Update from @pingou:
- Issue tagged with: RFE

6 years ago

Replace master in the URL with the hash for the version you want.

Metadata Update from @wombelix:
- Issue set to the milestone: 5.13

a year ago

Login to comment on this ticket.

Metadata
Attachments 1