# Showing all stashed changes in one go

2 messages from 2012-09-27 to 2012-09-27. Participants: Yann Dirson, Jeff King.
Thread: https://gitlist.dev/t/31664

## Yann Dirson, 2012-09-27 20:00

Subject: Showing all stashed changes in one go
Message-ID: <20120927200006.GD6493@home.lan>
URL: https://gitlist.dev/e/20120927200006.GD6493%40home.lan

```
When I have a couple of stashed changes, it gets annoying to
repeatedly call "git stash show -p stash@{N}" until finding the
correct one.

Since "git reflog show stash" already does part of the job, I thought
that adding "-p" there to see the patch would help (at least it would
show the not-yet-staged parts, which would already be a good start).

But the output is then really strange: does it really print the delta
between every two reflog entries ?  I can't think of a situation where
it would be was we want - but then, my imagination is known to be
deficient when I hit a situation that does not do what I was expecting
at first :)

Is there another way I missed to get all those stash contents listed,
besides scriptically iterating ?

```

## Jeff King, 2012-09-27 20:22

Subject: Re: Showing all stashed changes in one go
Message-ID: <20120927202225.GB11772@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120927202225.GB11772%40sigill.intra.peff.net
In-Reply-To: <20120927200006.GD6493@home.lan>

```
On Thu, Sep 27, 2012 at 10:00:06PM +0200, Yann Dirson wrote:

> When I have a couple of stashed changes, it gets annoying to
> repeatedly call "git stash show -p stash@{N}" until finding the
> correct one.
> 
> Since "git reflog show stash" already does part of the job, I thought
> that adding "-p" there to see the patch would help (at least it would
> show the not-yet-staged parts, which would already be a good start).
> 
> But the output is then really strange: does it really print the delta
> between every two reflog entries ?  I can't think of a situation where
> it would be was we want - but then, my imagination is known to be
> deficient when I hit a situation that does not do what I was expecting
> at first :)

This is a known issue. The reflog walker rewrites the parents of each
commit to make them look like a chain, but it means that your diffs are
between reflog entries, not to the true parents.

> Is there another way I missed to get all those stash contents listed,
> besides scriptically iterating ?

You can do:

  git rev-list -g <ref> | git log --stdin --no-walk <other options>

to show the individual commits with their true parents. But note that
stash commits are a little confusing (they are merges representing the
index and working tree state).

-Peff

```
