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

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

From
FCFabio Augusto Dal Castel <fdcastel@gmail.com>
Date
Feb 10, 2009, 20:48 UTC
Message-ID
<38cfbb550902101248v16f0f0f0v6a48cabf498317cf@mail.gmail.com>
In-Reply-To
<38cfbb550902101232l4c83b6dfjc70e1e2f79a8c3c1@mail.gmail.com>
Giuseppe
> I use stash when I want to move away from the current
> hacking because a new, more urgent change must be done
> somewhere else
Yes. That is exactly what stash is for. Temporary fixes. Now...
> Instead, I see a usecase for git snapshot for progressive
> temporary snapshot while working towards a more complex feature
> while needing temporary intermediate checkpoints

That's the idea. You could take a snapshot automatically every x minutes. For example: I'm testing it taking a snapshot on every build/compile of my project (and it is going fine, BTW).

> similar to what I currently achieve using git commit (a first
> time) and git commit --amend as my work progresses.

Except that, in this solution, you have only ONE saved state. Also, it needs to be done manually. I wanted something automatic (like John Wiegley's sugestion)

> In this respect, I wouldn't agree with the first difference you
> remarked, but that's just the usecase I have in mind.

Making another analogy: I see stash like a stack (you push/stash, and after you pop/apply). And I don't see stacks as a good long-term storages <g> (ok, you CAN 'cheat' and see all items other than the first)

Snapshots would be like a queue: You can keep it entirely, or you can keep only the last 'n' interesting snapshots, removing the others.

> I'm not sure I like the idea of creating these branches with these
> branchnames. What about using another refs/ subtree?

I'm also not sure <g>. The idea of refs/ is a good one, too (and could solve the problem of 'where to store the original index?'). But my first idea of using branches was to avoid a load of another 'maintenance' commands ('snapshot list', 'snapshot delete', etc) and to use a more known facility (branches).

Best regards,
Fabio.
Previous: Fabio Augusto Dal Castel
Message 16 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.