Hacker News new | ask | show | jobs
by thebigspacefuck 957 days ago
It’s annoying when someone force pushes to a branch that you just reviewed, but you can no longer see the history so you have to scan through the whole PR you already reviewed looking for the change. Please just commit the fix, let me see it, then squash it.
2 comments

You can just diff the previous head with the new one. In GitLab, it's simply a matter of clicking "Compare with previous version". Locally, it's `git diff branch@{1}..branch`.

It's only becoming tricky if the MR has been rebased onto a different base in the process, but it's not very hard to deal with that too if needed (just annoying).

Actually, it's not that annoying at all - TIL about `git range-diff`.
Unfortunately I haven't seen a git forge that will let you do "autosquash on merge" so I could just push up fixup commits as part of an merge request.
That always squashes the whole PR into a single commit, making it not very useful in practice. Git's autosquashing is much more powerful than that.