From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Migdol <michael-spam@migdol.net>, git@vger.kernel.org
Subject: Re: stash-p broken?
Date: Wed, 30 Jul 2014 20:16:27 -0400 [thread overview]
Message-ID: <20140731001627.GB22297@peff.net> (raw)
In-Reply-To: <xmqqlhrc2cfo.fsf@gitster.dls.corp.google.com>
On Tue, Jul 29, 2014 at 12:27:07PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > I think that is my point, though. The user is _not_ aware that the
> > commit in question is a merge. They stashed some stuff, and now they
> > want to see the result. I'd like to show them a vanilla commit if the
> > index is irrelevant, and otherwise show them something more interesting.
>
> I actually think "git stash list" users should be made very aware
> that they are looking at merge commits, and also what two states
> each of these merge commits represents.
Yeah, I kind of agree, but I also am not optimistic about most users
understanding that. I was trying to gamble on the fact that:
1. Naive users who do not understand the index will not stage files
and then stash in the first place. To them, the stash would be a
simple diff between two states, the commit and the working tree.
2. Advanced users would see the more complicated diff, but only
because they were doing more interesting things with the index.
They know what the index is, and therefore know that stash must be
saving it somehow.
Of course that breaks down when the naive user somehow ends up with
staged content in the index (e.g., they are resolving a merge and try to
stash). Then they are thrust into the more complicated situation either
way.
I dunno. I suspect that gamble would work _most_ of the time, and makes
an OK default. On the other hand, "git stash list" was completely
useless for showing diffs for many years, and since becoming useful has
required "--cc" to show anything good. And this is the first complaint
we've seen on the list. Maybe people don't actually care, and educating
people to use "--cc -p" (or "--first-parent -p") is fine.
-Peff
prev parent reply other threads:[~2014-07-31 0:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 0:38 stash-p broken? Michael Migdol
2014-07-29 0:56 ` Michael Migdol
2014-07-29 2:59 ` brian m. carlson
2014-07-29 6:45 ` Øystein Walle
2014-07-29 9:23 ` Jeff King
2014-07-29 17:00 ` Junio C Hamano
2014-07-29 17:43 ` Jeff King
2014-07-29 18:23 ` Junio C Hamano
2014-07-31 0:23 ` Jeff King
2014-07-31 16:49 ` Junio C Hamano
2014-07-29 19:27 ` Junio C Hamano
2014-07-31 0:16 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140731001627.GB22297@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=michael-spam@migdol.net \
/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.
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 NNTP newsgroup(s).