git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ed Avis <eda@waniasset.com>
To: git@vger.kernel.org
Subject: Re: Feature: git stash pop --always-drop
Date: Mon, 10 Aug 2015 15:16:42 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150810T171010-455@post.gmane.org> (raw)
In-Reply-To: xmqqzj1zuqod.fsf@gitster.dls.corp.google.com

Junio C Hamano <gitster <at> pobox.com> writes:
 
>>Yes, my use case is that I get confused about whether the stash has been
>>dropped or not and whether I might have stashed something else in the
>>meantime.  So for me plain 'git stash drop' feels a bit dangerous.
>
>Then "git stash apply" followed by "git stash drop" would be a pair
>of good workflow elements for you, no?

I like ordinary 'git stash pop' when it applies cleanly.  Only in the cases
where it has conflicts and leaves the stash in place does it get a bit
awkward.  I manually resolve the conflicts and then 'git stash drop', but
that last step is a bit dangerous because it might drop an unrelated stash
if I have done some other stashing in the meantime.

If 'git stash pop' (and 'apply') would always print the name of the stash,
then it would be easy to drop that particular stash afterwards.  Running
one too many or one too few 'git stash drop' commands would no longer cause
problems.

Printing the name of the stash would, for me, largely remove the need for
an --always-drop option to git stash, which is what I at first suggested.

-- 
Ed Avis <eda@waniasset.com>

      reply	other threads:[~2015-08-10 15:16 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
2015-08-10 14:01           ` Ed Avis
2015-08-10 15:08             ` Junio C Hamano
2015-08-10 15:16               ` Ed Avis [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=loom.20150810T171010-455@post.gmane.org \
    --to=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).