Storage
Storage
The write-ahead log in object storage, the compare-and-swap commit point, and replay into the cache.
The heart of Ghost. Every feature that touches git depends on the rules in this chapter; read it slowly and do the exercises.
The log in the bucket
Two kinds of object per repository, and why each holds what it holds.
The binary format
Why the index and entry headers are hand-rolled bytes, and the two fields that look like overhead and are not.
The commit point
commitPush, line by line. One conditional PUT, a retry loop, and a failure table you should be able to recite.
Materialization
How the local cache catches up with the log, why it only ever moves forward, and why the push path leaves it deliberately stale.
Verifying a push before it commits
The bug that made a repository unreadable for good, and the three checks that now run before the commit point.
Deletion, repair and what is not built
Tombstones, purges, the repair tool, and the storage work still ahead.