Investigate way to exclude internal refs from cat-file repository size calculation
Overview
In !4797 (merged), we are switching to git cat-file
to calculate the total size of a repository. One key limitation is we can't exclude certain refs. We should investigate if there is any way to exclude certain refs from the calculation using git cat-file
What does this mean?
GitLab uses internal refs
to track different aspects of tooling. While these are indeed utilizing disk space, customers have limited control over them and we should attempt to filter them out when we calculate repository size as these should not count against a customer's allocated space. Calculations have shown that only in worst case conditions, there may be up to a 25% variance from these internal refs
. However, the more usual case is that these are negligible and should not impact the vast majority of our users.