{"thread":{"id":"31664","subject":"Showing all stashed changes in one go","startedAt":"2012-09-27T20:00:06Z","lastAt":"2012-09-27T20:22:25Z","messageCount":2,"participants":["Yann Dirson","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"200045","messageId":"20120927200006.GD6493@home.lan","threadId":"31664","inReplyTo":null,"subject":"Showing all stashed changes in one go","fromName":"Yann Dirson","fromEmail":"ydirson@free.fr","sentAt":"2012-09-27T20:00:06Z","receivedAt":"2012-09-27T20:00:06Z","isPatch":false,"sender":{"key":"ydirson@free.fr","avatar":null},"body":"When I have a couple of stashed changes, it gets annoying to\nrepeatedly call \"git stash show -p stash@{N}\" until finding the\ncorrect one.\n\nSince \"git reflog show stash\" already does part of the job, I thought\nthat adding \"-p\" there to see the patch would help (at least it would\nshow the not-yet-staged parts, which would already be a good start).\n\nBut the output is then really strange: does it really print the delta\nbetween every two reflog entries ?  I can't think of a situation where\nit would be was we want - but then, my imagination is known to be\ndeficient when I hit a situation that does not do what I was expecting\nat first :)\n\nIs there another way I missed to get all those stash contents listed,\nbesides scriptically iterating ?\n"},{"id":"200047","messageId":"20120927202225.GB11772@sigill.intra.peff.net","threadId":"31664","inReplyTo":"20120927200006.GD6493@home.lan","subject":"Re: Showing all stashed changes in one go","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-09-27T20:22:25Z","receivedAt":"2012-09-27T20:22:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 27, 2012 at 10:00:06PM +0200, Yann Dirson wrote:\n\n> When I have a couple of stashed changes, it gets annoying to\n> repeatedly call \"git stash show -p stash@{N}\" until finding the\n> correct one.\n> \n> Since \"git reflog show stash\" already does part of the job, I thought\n> that adding \"-p\" there to see the patch would help (at least it would\n> show the not-yet-staged parts, which would already be a good start).\n> \n> But the output is then really strange: does it really print the delta\n> between every two reflog entries ?  I can't think of a situation where\n> it would be was we want - but then, my imagination is known to be\n> deficient when I hit a situation that does not do what I was expecting\n> at first :)\n\nThis is a known issue. The reflog walker rewrites the parents of each\ncommit to make them look like a chain, but it means that your diffs are\nbetween reflog entries, not to the true parents.\n\n> Is there another way I missed to get all those stash contents listed,\n> besides scriptically iterating ?\n\nYou can do:\n\n  git rev-list -g <ref> | git log --stdin --no-walk <other options>\n\nto show the individual commits with their true parents. But note that\nstash commits are a little confusing (they are merges representing the\nindex and working tree state).\n\n-Peff\n"}]}