In GitLab, each project’s landing page shows some statistics on the project’s files, commits, branches, and tags. For files, a size is displayed, as follows:
How is this total file size calculated? When I clone the repository that I used to create the above screenshot, both
du -s -h and
git count-objects -vH report total file sizes that are far, far lower. The latter command shows 174.74K, and the former shows shows 356K for the
.git folder alone, or 940K for the largest of four branches. It occurred to me that someone may have checked in (and then maybe later deleted) some very large sparse files, but
du --apparent-size reports similarly small total sizes for the directory, even when run after checking out each of the six individual commits. Using this script to find big deleted files in the commit history also turns up nothing.
So how is it that GitLab thinks there are 4GB worth of files in the repository? Is there any way I can get it to show me big files or big commits?