Skip to content

stats: Capture reftable information in repository stats

James Liu requested to merge jliu-reftable-repo-info into master

Context

Issue: #5870 (closed)

The reftable backend stores references completely differently to the classic "files" backend. Instead of placing loose and packed refs in the refs/ directory, the reftable backend organises refs into binary files called tables, under the reftable/ directory. You can read more about reftables in the documentation: https://www.git-scm.com/docs/reftable

Implement the TODO items in the reftable-specific branch of the ReferencesInfoForRepository function. We use tables.list as the starting point, and process each reftable table contained in the list.

The min_update_index and max_update_index can be directly extracted from the table's filename. We stat the file to get the size. We count the difference between the number of files in the reftable/ directory and the number of expected tables (plus tables.list itself).

Edited by James Liu

Merge request reports