Re: Rollback of git commands
- From
- Geert Bosch <bosch@adacore.com>
- Date
- Nov 28, 2007, 04:07 UTC
- Message-ID
- <3AAC5548-A9AC-4236-B1F7-5CFDE11B52C4@adacore.com>
- In-Reply-To
- <9e4733910711271749q1b96bfe9i60e43619c89234b9@mail.gmail.com>
On Nov 27, 2007, at 20:49, Jon Smirl wrote:
Show 5 quoted lines
> Rollback is too strong of name for this. Checkpoints would be better. > The idea is to record the total system state at convenient moments and > then allow moving back to the checkpointed state. The object store > supports this, but the rest of the state in .git/* isn't being > recorded.
I have always wondered why refs and tags are not in the regular object store. In a way, there should be just one root pointer (SHA1) pointing to a tree with refs, etc.
As for the problem of "lots of loose objects", each command could write a single pack file. By directly writing deltas instead of complete new tree objects, storage requirements should be modest. Also, just writing a single new pack file is very efficient for I/O purposes.
To prevent too many pack files, a merge policy could allow a new pack to include (and thus obsolete) a number of similarly sized or smaller packs. After the new file has been successfully written, the old files are no longer necessary and can be moved to a "trashes" area to be expired.
-Geert