I'm trying to do a code review on a feature branch that has changes from the mainline merged in at several points. I make this question's title intentionally very similar to Show non-merge differences for two commits in git but I'm not satisfied with the answers.
My problem is that the feature branch has multiple commits on same files and some changes are reverted or changed again.
One of the answers in above question is to use git log --no-merges -p branch-start..branch-end
. I find that the resulting diff file still mentions changes in files that were not part of the real work on the branch.
Another suggestion - to use --first-parent
- comes closer, but I get a diff that contains the same file multiple times, once for each commit. As I'm not interested in the history of the change, just the final state, this doesn't allow me to have the initial state on the left side and the final state on the right side of the diff viewer.
BTW, I'm using ReviewBoard to import the diff and do the review.