News for hackers. Stuff that matters.
Re:How to annotate everything by cfors on Wednesday November 27, 2019 @03:12PM (#21651599)
Seriously. Especially when something seems like a bizarre choice in the code, I'll provide a link if there is a corresponding GitHub issue or code regarding it.

I've never had an issue with GitHub issues regarding linkrot, but it happens quite frequently when linking actual source code, especially code not in your control. Not sure what a better solution is for that, unfortunately.

I generally justify it by the anecdotal observation that the code is generally not being used anymore by the time the link dies out, but that is far from an ideal justification.

Re:How to annotate everything by jakub_g on Wednesday November 27, 2019 @03:46PM (#21651932)
Assuming you use GitHub for source control:

- Go to GitHub.com repo and find the file (You can use 't' keyboard shortcut to find it)

- Press 'y' on keyboard to replace 'master' with its SHA1 in the URL

- Click on the interesting line of code

- You have a forever-valid link (assuming no push --force) to the exact line of code

Re:How to annotate everything by gugagore on Wednesday November 27, 2019 @04:54PM (#21652538)
I thought a push --force would change the hash, anyway.
Re:How to annotate everything by jakub_g on Wednesday November 27, 2019 @05:00PM (#21652601)
I meant that push --force may make the given commit disappear if it's not referenced by any branch and the repo gets garbage collected on the backend, then the URL will 404.