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 2, 2009, 04:59 UTC
Message-ID
<20090902045937.GA12046@coredump.intra.peff.net>
In-Reply-To
<7vy6oyj892.fsf@alter.siamese.dyndns.org>

[cc'ing Dscho, as he was the main opponent of similar proposals, and I suspect his silence here means he missed this discussion. I hope this addresses his concerns, but I think it is good to get comment from all interested parties.

I'll just quote as appropriate below to comment, but for the whole patch see:

  http://article.gmane.org/gmane.comp.version-control.git/127574
]
On Tue, Sep 01, 2009 at 09:11:37PM -0700, Junio C Hamano wrote:
> This makes the logic of defaulting to "save" much simpler. If there is no
> non-flag arguments, it is clear that there is no command word, and we
s/is/are/ (or s/arguments/argument/)
Show 11 quoted lines
> --- a/Documentation/git-stash.txt
> +++ b/Documentation/git-stash.txt
> [...]
> -	--hard` to revert them.  This is the default action when no
> -	subcommand is given. The <message> part is optional and gives
> -	the description along with the stashed state.
> +	--hard` to revert them.  The <message> part is optional and gives
> +	the description along with the stashed state.  For quickly making
> +	a snapshot, you can omit _both_ "save" and <message>, but giving
> +	only <message> does not trigger this action to prevent misspelled
> +	subcommand from making an unwanted stash.
s/misspelled/a &/
-Peff
Previous: Junio C HamanoNext: Johannes Schindelin
Message 7 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.