Re: git-stash: RFC: Adopt the default behavior to other commands
- From
Andreas Ericsson <ae@op5.se>
- Date
- Dec 19, 2007, 08:29 UTC
- Message-ID
- <4768D684.5060300@op5.se>
- In-Reply-To
- <46a038f90712182346t5309448egebfd3726f4d493c5@mail.gmail.com>
Martin Langhoff wrote:
Show 37 quoted lines
> On Dec 19, 2007 8:33 PM, Wincent Colaiuta <win@wincent.com> wrote: >> El 19/12/2007, a las 0:41, Martin Langhoff escribió: >> >>> On Dec 19, 2007 4:42 AM, Jörg Sommer <joerg@alea.gnuu.de> 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@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231