Re: [RFD/PATCH] stash: introduce checkpoint mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 19, 2015, at 09:49, Junio C Hamano wrote:
"Kyle J. McKay" <mackyle@xxxxxxxxx> 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!".

Does that reasoning not also apply to the plethora of commands that take "--force" already?

I didn't check them all, but tag, checkout, push and branch immediately come to mind. Why is it okay for all those other commands to have a --force mode, but not git stash?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]