Re: [RFD/PATCH] stash: introduce checkpoint mode
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 19, 2015, 17:49 UTC
- Message-ID
- <xmqq7fvd23mw.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <8AAD6FE6-75C1-4BA2-8667-4DF8BF6B1EE4@gmail.com>
"Kyle J. McKay" <mackyle@gmail.com> writes:
Show 6 quoted lines
> 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!".