dev/sg: fix repo state diff by comparing from merge base
Created by: bobheadxi
Old implementation includes unmerged commits, this fixes.
Test plan
Check out outdated branch and run git diff origin/main... -- **/*.go
, should not see unexpected changes