Hacker News new | ask | show | jobs
by JMTQp8lwXL 1855 days ago
What's different is you get functionally different links. GitLab aliases to the branch name, not the commit hash. So it isn't really a "permanent" link to a line of code. It's whatever happens to be on line N in file X on branch Y at time T, whenever you open the link. This is inconvenient when I might find an old link in an engineering Slack thread, referencing something now much different since the file was amended over time. In fact, the file may not even exist anymore.

GitHub, by default, includes the commit hash. So the line of code will be the same at any point in the future: the file, at that line number, with that commit hash, is immutable (unless developers force push history rewrites, but you get my broader point).

1 comments

To do this in GitLab, click the permalink button before copying the line.