public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Kyle J. McKay" <mackyle@gmail•com>
Cc: "Michael J Gruber" <git@drmicha•warpmail.net>,
	git@vger•kernel.org,
	"Armin Ronacher" <armin.ronacher@active-4•com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
Subject: Re: [RFD/PATCH] stash: introduce checkpoint mode
Date: Thu, 19 Feb 2015 09:49:11 -0800	[thread overview]
Message-ID: <xmqq7fvd23mw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <8AAD6FE6-75C1-4BA2-8667-4DF8BF6B1EE4@gmail.com> (Kyle J. McKay's message of "Thu, 19 Feb 2015 05:58:14 -0800")

"Kyle J. McKay" <mackyle@gmail•com> writes:

> What about a shortcut to "reset-and-apply" as well?
>
> I have often been frustrated when "git stash apply" refuses to work
> because I have changes that would be stepped on and there's no --force
> option like git checkout has.  I end up doing a reset just so I can
> run stash apply.

Doesn't that cut both ways, though?

A single step short-cut, done in any way other than a more explicit
way such as "git reset --hard && git stash apply" (e.g. "git stash
reset-and-apply" or "git stash apply --force") that makes it crystal
clear that the user _is_ discarding, has a risk of encouraging users
to form a dangerous habit of invoking the short-cut without thinking
and leading to "oops, I didn't mean that!".

  reply	other threads:[~2015-02-19 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 10:41 Experience with Recovering From User Error (And suggestions for improvements) Armin Ronacher
2015-02-16 12:09 ` Ævar Arnfjörð Bjarmason
2015-02-16 12:10   ` Ævar Arnfjörð Bjarmason
2015-02-16 12:37     ` Duy Nguyen
2015-02-16 13:29   ` Armin Ronacher
2015-02-18  9:46     ` Michael J Gruber
     [not found]       ` <19A600EC-080C-48F1-A949-9A32AFC247E7@gmail.com>
2015-02-19 11:01         ` Michael J Gruber
2015-02-19 12:34           ` [RFD/PATCH] stash: introduce checkpoint mode Michael J Gruber
2015-02-19 13:58             ` Kyle J. McKay
2015-02-19 17:49               ` Junio C Hamano [this message]
2015-02-19 23:43                 ` Kyle J. McKay

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=xmqq7fvd23mw.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=armin.ronacher@active-4$(echo .)com \
    --cc=avarab@gmail$(echo .)com \
    --cc=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mackyle@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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