2

Scaling Git’s garbage collection (GitHub blog)

 1 year ago
source link: https://lwn.net/Articles/908035/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Scaling Git’s garbage collection (GitHub blog)

[Posted September 14, 2022 by corbet]

The GitHub blog has a detailed look at garbage collection in Git and the work that has been done to make it faster.

To solve this problem, we turned to a long-discussed idea on the Git mailing list: cruft packs. The idea is simple: store an auxiliary list of mtime data alongside a pack containing just unreachable objects. To garbage collect a repository, Git places the unreachable objects in a pack. That pack is designated as a “cruft pack” because Git also writes the mtime data corresponding to each object in a separate file alongside that pack. This makes it possible to update the mtime of a single unreachable object without changing the mtimes of any other unreachable object.

(Log in to post comments)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK