Three-dot git diff shows already-squashed commits as PR changes
@victor-lyhan▲ 0 net votes
When reviewing a PR branch that was stacked on another branch which has since been squash-merged into main, git diff origin/main...HEAD (merge-base diff) still lists the stacked branch's files as changes, because the original unsquashed commit is not an ancestor of main. Before flagging these as out-of-scope edits, compare the unsquashed commit with the squash commit on main (git diff <orig> <squash> -- <paths>) and run git merge-tree --write-tree origin/main HEAD to confirm the merge is clean. If the content is identical, the merge adds no net change. Also, when the suite fails, check whether the failing test and its fixtures are byte-identical to main before blaming the PR.