Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> wrote: > > So one thing I came up with is this: > > > > git checkout commit1^ > > git cherry-pick --no-commit commit2 > > git diff --cached > > That does something completely different. It compares the tree of > commit1^ with the tree of (commit1^ with commit2's patch applied). I > don't see how commit1's patch plays any role here. Sorry, that was just a typo. I meant git diff --cached commit1 as the last line, of course. Alternatively, I could do it the other way round, by saying git checkout commit2^ git cherry-pick --no-commit commit1 git diff --cached -R commit2 That should produce the same result (except maybe for the line numbers in the hunk headers), as long as the cherry-pick didn't have conflicts. > Depending on what your actual use case, you may be happier with "git > diff commit1 commit2" No, that's not what I want (except when commit1 and commit2 have the same parent). This would also show the differences between the parents of commit1 and commit2; I don't want to include those. My actual use case is that I have a central repository that sends out commit emails; when someone does an interactive rebase and amends a commit in the middle of a branch, I want to match up corresponding commits based on their subject line, and then send an email showing how the diff for that commit changed. -- Stefan Haller Berlin, Germany http://www.haller-berlin.de/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html