Repository size check doesn't work properly when many branches or tags are pushed
From gitlab-com/support-forum#4445 (closed), a user attempted to push a 10 MB repository that contained over 200 branches, but it was rejected due to the 10 GB repo limit:
$ git push -u origin --all Counting objects: 42974, done. Delta compression using up to 4 threads. Compressing objects: 100% (15960/15960), done. Writing objects: 100% (42974/42974), 9.98 MiB | 6.47 MiB/s, done. Total 42974 (delta 32959), reused 35670 (delta 26713) remote: Resolving deltas: 100% (32959/32959), done. remote: GitLab: Your push to this repository would cause it to exceed the size limit of 9.8 GB so it has been rejected. Please contact your GitLab administrator for more information.
I think the repository size check may be erroneously counting objects, perhaps double counting the same objects in different branches.
This problem also happens on GitHub imports: https://sentry.gitlab.net/gitlab/gitlabcom/issues/700403