Hacker News new | ask | show | jobs
by Aeolun 55 days ago
How does that work? If the code the comment applies is to is changed, does it expand the range? Or try to relocate it or something? Or it just doesn’t try at all, and it just applies a comment to a certain change/diff section?
1 comments

It does (hand waving) things to keep the comment in place. It doesn't always get it 100% right, but it's pretty good.

But more importantly, Gerrit has a "Change-Id" it adds to the git commit which is independent of the git hash, so it can track changes independent on the "logical" commit separate from the physical commit.

It also is able because of this to show you what changed for a given commented section between those commits. Allowing you to properly review the changes.

GitHub just acts like a dumbass and throws away comments or threads if the original commit is rewritten. And so forces you into this garbage workflow of endless "commit to address review comments" or "new version" commits, which then have to be either manually rewritten before merge, turned into a (garbage) merge commit, or squashed down into one commit.