When I run a test on my code, I always take a snapshot of the code in git (using stash create) and attach the commit ID to the test (making sure to put it on a reflog to prevent it from being garbage collected). This way I can later easily check exactly what code lead to that test output.
But often, I want to compare that old code to my current version of the code. The problem is that my current version of the code has been rebased on the master branch, so a git diff will show the combined difference of hundreds of commits. What I currently do instead is two git shows followed by a normal (non-git) diff, but this has the huge disadvantage that for every line that has a different line number, this line number is considered a difference.
So is there an easy way to do a diff between two commits when the second commit has been rebased? So basically, I'm looking for something similar to rebasing the first commit internally, showing the diff, then getting rid of the internal rebased version of that commit. Of course, if the rebase fails, so be it, but in most cases rebases simply work for me, so this would still be useful in most cases.
I think I could write this myself, but it seems like it would be a common problem, so I'm wondering if something like this already exists?