Re: git-stash: RFC: Adopt the default behavior to other commands

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

 



Martin Langhoff wrote:
On Dec 19, 2007 8:33 PM, Wincent Colaiuta <win@xxxxxxxxxxx> wrote:
El 19/12/2007, a las 0:41, Martin Langhoff escribió:

On Dec 19, 2007 4:42 AM, Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
I may be missing something here, but what's the danger here? An

Surprise. Your working directory has *just* changed under your feet.
Maybe you have an editor with further unsaved changes that is about to
act confused whether you undo the stash or not.

unexpected stash is incredibly easy to revert, unless I'm missing

Once you know about it, yes it is. Once you know about the reflog, you
can sing and dance and never be worried. But for starting users, it's
a dangerous command.

And nobody commented on the idea I posted earlier which
seems to address the concerns about newbies not knowing what "git
stash" with no params does:

I agree with making stash more verbose -- if the unlucky new user is
paying close attention, they'll have instructions on to how to get out
of trouble. But I agree more with making it "just verbose, no action"
by default. There are two strong hints:

 - all other state-changing commands take parameters
 - quite a few people in this list have gotten burned with it

Even after knowing pretty well how stash works, I still get mixed up
sometimes with the 'clear/clean/list' stuff. Or have a typo in the
command.


The clear vs clean confusion has been remedied though, and you can no
longer create a named stash without using "git stash save" with a
recent enough version of git.

--
Andreas Ericsson                   andreas.ericsson@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
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]

  Powered by Linux