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

Re: [RFC] New command: 'git snapshot'.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Feb 11, 2009, 09:04 UTC
Message-ID
<vpq3aelcpjk.fsf@bauges.imag.fr>
In-Reply-To
<20090210230054.GD26954@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Tue, Feb 10, 2009 at 06:40:34PM -0200, Fabio Augusto Dal Castel wrote:
>
>> Remember that 'stash' is actually TWO commands in one:
>> * Save current state
>> * Reset to HEAD
>> 
>> My primary reason to use snapshots is to AVOID the second step.
>
> Doesn't that argue for "git stash --no-reset" or similar instead of a
> separate command?

I also think adding options to "git stash" would be better than creating a new command. The "git has too many commands" is already one of the blocking factors for newcommers.

And indeed, I don't think the choice in the comparison table between stash and snapshot should be all-or-nothing. There could be individual options like --save-untracked, --per-branch, ... (--no-reset would probably be redundant with stash create, but maybe stash create needs a --keep-object-somewhere-in-a-reference like option). Then, having "git snapshot" would just be a matter of creating the accurate alias.

-- 
Matthieu
Previous: Jeff KingNext: Fabio Augusto Dal Castel
Message 14 of 16 in “[RFC] New command: 'git snapshot'.”
  1. Fabio Augusto Dal CastelFeb 9, 2009
  2. Giuseppe BilottaFeb 9, 2009
  3. Brandon CaseyFeb 9, 2009
  4. Sitaram ChamartyFeb 10, 2009
  5. Jon LoeligerFeb 10, 2009
  6. Junio C HamanoFeb 10, 2009
  7. Sitaram ChamartyFeb 11, 2009
  8. Fabio Augusto Dal CastelFeb 10, 2009
  9. Jeff KingFeb 10, 2009
  10. Junio C HamanoFeb 10, 2009
  11. Jeff KingFeb 10, 2009
  12. Geoffrey LeeFeb 10, 2009
  13. Jeff KingFeb 11, 2009
  14. Matthieu MoyFeb 11, 2009
  15. Fabio Augusto Dal CastelFeb 11, 2009
  16. Fabio Augusto Dal CastelFeb 10, 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.