4 ms·
> In practice, git stores a lot more diffs (or rather, deltas) than it stores loose blobs. The diffs it stores are not the diffs you see in git diff. They're
by ori_b 5y ago
> In practice, git stores a lot more diffs (or rather, deltas) than it stores loose blobs.
The diffs it stores are not the diffs you see in git diff.
They're rolling checksum based chunks. The data that the delta is computed against is picked with a heuristic ("sort by name and date, try the top 10, and use the smallest result"). And, in practice, the heuristic diffs the older files against the newer ones, rather than diffing in chronological order, so that getting recent data doesn't involve a lot of delta application.
The git deltification is better thought of as a compression method than as diffing.