git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: stash --dwim safety

From
Jeff King <peff@peff.net>
Date
Sep 1, 2009, 06:57 UTC
Message-ID
<20090901065716.GA5575@sigill.intra.peff.net>
In-Reply-To
<vpqocpv2n93.fsf@bauges.imag.fr>
On Tue, Sep 01, 2009 at 08:27:20AM +0200, Matthieu Moy wrote:
Show 5 quoted lines
> 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
Previous: Matthieu MoyNext: Junio C Hamano
Message 5 of 16 in “What's cooking in git.git (Aug 2009, #06; Sun, 30)”
  1. Junio C HamanoAug 31, 2009
  2. Johan HerlandAug 31, 2009
  3. stash --dwim safety (was Re: What's cooking in git.git (Aug 2009, #06; Sun, 30))Junio C Hamano, Sep 1, 2009
  4. Matthieu MoySep 1, 2009
  5. Jeff KingSep 1, 2009
  6. Junio C HamanoSep 2, 2009
  7. Jeff KingSep 2, 2009
  8. Johannes SchindelinSep 2, 2009
  9. Matthieu MoySep 2, 2009
  10. Peter KreftingSep 1, 2009
  11. Jakub NarebskiSep 1, 2009
  12. Junio C HamanoSep 1, 2009
  13. Jakub NarebskiSep 2, 2009
  14. Peter HarrisSep 2, 2009
  15. Nick EdelenSep 1, 2009
  16. Junio C HamanoSep 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.