3 ms·
One of my pet peeves is linking to 'master' in git repos. This link has a higher chance than usual to link-rot because it's intentional that the repo can chang
by TheDong 9y ago
One of my pet peeves is linking to 'master' in git repos.
This link has a higher chance than usual to link-rot because it's intentional that the repo can change its structure over time.
Even if it doesn't change its structure, it's likely the file will change over time, so discussion here referencing line numbers or paragraphs or whatever will become wrong.
Repos shouldn't have to worry about people linking to them either (as e.g. a reason to not move files around willy-nilly)
Since by (rather strong) convention tags are immutable, you can link to a tag instead.
In this case: https://github.com/torvalds/linux/blob/v4.13/Documentation/networking/tls.txt https://github.com/torvalds/linux/blob/v4.13/Documentation/n...
That link is also better because it explicitly shows the version of the repo that is being referenced as well.
Even if there isn't a suitable tag, I'd much prefer a link to the commit hash than any branch, which is expected to move.