git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Ed Avis <eda@waniasset.com>
Cc: git@vger.kernel.org
Subject: Re: Feature: git stash pop --always-drop
Date: Mon, 10 Aug 2015 09:49:58 -0400	[thread overview]
Message-ID: <20150810134957.GC6763@sigill.intra.peff.net> (raw)
In-Reply-To: <loom.20150810T153939-856@post.gmane.org>

On Mon, Aug 10, 2015 at 01:43:07PM +0000, Ed Avis wrote:

> Jeff King <peff <at> peff.net> writes:
> 
> >>An alternative would be for git stash to always print the name of the stash
> >>it is applying.
> 
> >  Applying refs/stash@{0} (31cb86c3d700d241e315d989f460e3e83f84fa19)
> 
> Yes, that's the one.
> 
> >Or maybe it would be useful to actually show the stash subject,
> 
> That could be nice to see, but is not a substitute for the SHA.

I think you'd be _technically_ OK without the sha1 in the "applying
message", because you can refer to it as stash@{0} until it is dropped,
and the drop message does mention the sha1. But that seems needlessly
complicated for the user. I agree that including the sha1 is reasonable
(though we might want to use an abbreviated one if there is other stuff
to go on the line).

> If the stash pop failed because of conflicts then it could even print
> 
>     To drop this stash manually, run 'git stash drop abcde...'

Yup, that makes sense. You might want to make it optional an advice.*
config key, though. I also wondered if the "dropped" message is
sufficiently clear to new users. The point of it, I think, is to allow a
final "oops, I didn't mean to do that" moment. But there are no
instructions for how one would re-create the same stash.

It might be that showing instructions on even successful drops would
quickly get annoying, though. I dunno. I tend to turn off most of our
advice config myself.

> Another feature I would like to see is a kind of atomic stash apply, where
> either the whole change can be applied to the working tree without conflicts,
> or nothing happens.

I think that may be a bit harder, as the merge machinery would have to
know how to be atomic. Still, I agree it's a good goal if you'd like to
work on it.

-Peff

  reply	other threads:[~2015-08-10 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 10:42 Feature: git stash pop --always-drop Ed Avis
2015-08-10 12:41 ` Jeff King
2015-08-10 12:50   ` Ed Avis
2015-08-10 13:32     ` Jeff King
2015-08-10 13:43       ` Ed Avis
2015-08-10 13:49         ` Jeff King [this message]
2015-08-10 14:01           ` Ed Avis
2015-08-10 15:08             ` Junio C Hamano
2015-08-10 15:16               ` Ed Avis

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=20150810134957.GC6763@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=eda@waniasset.com \
    --cc=git@vger.kernel.org \
    /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).