Optimizing reference deletions in Git
Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.
Git has introduced a new `git refs optimize` command that consolidates loose reference files into the packed-refs format, addressing scalability limits in its files-based reference backend, which remains the default as of Git 2.56. The loose-ref design creates one file per reference, causing inode costs, filesystem overhead from `.lock` files, slow iteration, and no atomicity for multi-reference updates—problems that surface at scale, as in GitLab's gitlab repository, which holds over 15 million references. Git added the packed-refs format in 2006 to mitigate these issues, and the new optimize command now repacks loose refs into that single sorted file. The reftable backend, introduced in Git 2.45, is slated to become the default in Git 3.0 and is positioned as the longer-term fix. What to watch: adoption of `git refs optimize` ahead of the Git 3.0 transition and whether large monorepo operators migrate off the files backend.
Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.
Named in this story
Git, GitLab