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

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

From
Jeff King <peff@peff.net>
Date
Feb 11, 2009, 13:43 UTC
Message-ID
<20090211134322.GB19223@coredump.intra.peff.net>
In-Reply-To
<83d7aaa40902101539m3c40deeeo2d452f6dbb7c379c@mail.gmail.com>
On Tue, Feb 10, 2009 at 03:39:19PM -0800, Geoffrey Lee wrote:
> Git stash doesn't touch untracked files, whereas git snapshot would.
> Take another closer look at the table in the original post titled
> "What are the differences between 'git stash' and 'git snapshot'?"

Sure, I was just responding to that particular statement about reset. But I think it generalizes. Why not "--untracked" as an option?

In other words, there are several behaviors that people might not like about stash, and I think they can be combined in multiple ways. So one solution is to make another command which chooses a different set of behaviors. But what about the person who wants "--untracked" but not "--no-reset"? Do they make a third command?

So it is much more flexible to make orthogonal switches that can be turned on and off independently. And of course if you have a workflow which always uses a particular set of switches, it is convenient to hide it behind an alias. And if there are just a few workflows that are common to a lot of people, those can graduate to become git commands.

But this proposal seems to be starting in the opposite direction, with a new command that is closely related to stash but changes a few behaviors. I haven't seen a convincing argument that between stash and snapshot, git will now serve all or most people's workflows (and we don't need another command that does something in between).

-Peff
Previous: Geoffrey LeeNext: Matthieu Moy
Message 13 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.