Hi,
I think this would best be prototyped as a third party project. One potentially deal-breaking issue I see with this approach is that diffs aren't precise (or rather, what they precisely are doesn't align well with what humans expect). I'd imagine that you'd come up with tons of false positives, where code gets moved around in a refactoring, appears in the diff because of a `go fmt` re-indent (e.g. in a struct or var/const block) or even when it wasn't changed at all, the heuristic just chose the one way to chunk the changes that included the relevant line.
Like, I'm sure we all saw plenty of occasions where a commit we reviewed wasn't diff'ed in the way we expected.
Best,
Axel