git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Yann Dirson <ydirson@free.fr>
Cc: GIT list <git@vger.kernel.org>
Subject: Re: Showing all stashed changes in one go
Date: Thu, 27 Sep 2012 16:22:25 -0400	[thread overview]
Message-ID: <20120927202225.GB11772@sigill.intra.peff.net> (raw)
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

      reply	other threads:[~2012-09-27 20:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 20:00 Showing all stashed changes in one go Yann Dirson
2012-09-27 20:22 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120927202225.GB11772@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=ydirson@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).