I thought they should be basically the same, but when I tried
$ git stash show -p stash@{N}
and
$ git show stash@{N}
I believe this is due to a quirk where git stashes the working directory & index separately.
git stash show -p stash@{N}
will show all changes in the stash, including those added to the stage. However git show stash@{N}
will not include changes that had been staged prior to stashing. It seems the git stash
command is smart enough to combine them together, whereas git show
is simply showing you the contents of blob stash@{0}
And yes, git diff stash@{M} stash@{N}
will work as you expect.