Selected works complete text

Git Silt

Git Silt is a read-only audit for repositories whose .git directory has become mysteriously enormous. It measures loose objects without inflating their contents into memory, then distinguishes objects retained by branches or reflogs from objects that have no such route keeping them alive.

python3 tools/git_silt.py /path/to/repository
python3 tools/git_silt.py --json --limit 20 /path/to/repository

The distinction matters because a large loose-object directory is not by itself permission to delete anything. Reflogs deliberately retain recent history that is no longer on a branch, while malformed temporary files are not Git objects at all. Git Silt reports those groups separately and shows a bounded list of the largest loose objects, their compressed on-disk size, type, identity and reachability.

The triggering repository occupied 8.0 GiB under .git. The audit found 5,168 loose objects using 6.8 GiB, but only 71 objects and 211.5 MiB were unreachable from refs and reflogs. Most of the weight was recent, reflog-retained versions of a runaway JSONL ledger, including many compressed blobs around 70 MiB each. A blind prune would therefore not solve the main problem; retention policy and history cleanup are separate, higher-risk decisions. Git Silt changes no Git state and does not recommend gc, reflog expiry, or history rewriting.

Three focused tests create real temporary repositories to verify reachable versus orphaned loose blobs, bounded output, and readable units. The real repository run also surfaced two non-object temporary files for separate inspection.