Re: stash --dwim safety
From: Jeff King <hidden>
Date: 2016-06-15 22:47:20
On Tue, Sep 01, 2009 at 08:27:20AM +0200, Matthieu Moy wrote:
I was actually thinking of being a little more paranoid to prevent accidental "stash save": we could refuse to create a named stash when the "save" command is not given. The case I hadn't thought of was "git stash -q apply", which has 99% chances of being a typo for "git stash apply -q", and which would mean "create a stash named apply, quietly".
I like that. I think it addresses Dscho's concern with mistakes causing an unexpected stash, and it is actually more consistent with the current rule (that named stashes need an explicit 'save'). IOW, it is actually a bit confusing that "git stash foo" doesn't work, but "git stash -k foo" does. -Peff