Well, first of all, I don’t think this even applies since we’re only discussing oneboxed links. Oneboxes get embedded into the post, the user can see this happen in the post preview pane, embedded content should not change over time.
If the link is not oneboxed, it is not rewritten at all, so you can always link to a given file at latest commit by surrounding that link with text or giving it a label different from the link target.
By the way… the Github code search emits links to specific commits. ![]()