Repository size check will be inaccurate when using Git Object Pools
The repository size check depends on the size of the Git repository on disk by executing a du -s
. This is accurate, and the best way to go about this in most cases.
Recently however, GitLab introduced the notion of object pooling for Git repositories. Which means that if a fork and a source project of this fork share commits/objects, these are only stored once on disk in a third repository, the pool repository. In the most ideal case, these objects are only stored once. So the fork and the source repository will only store misc data, like the linguist cache, commit graph, refs, and others. The size on disk of a deduplicated copy of GitLab-CE is about 5MB.
This means that the repository size check will not be accurate if the pool is not taking into account. But a du
on the pool is not accurate either, as one might remove branches or such on their fork, in which case not all objects should be required for the fork.
For now, the abuse vector is limited given object deduplication is only done for public projects, but this might change through: gitaly#1561