Gitlab repostories are empty, and their .git repostory folders are weird

Hello all,

After one developer (which now left the company) updated our Gitlab CE instance, repositories seem to be empty in Gitlab. However, when you clone the project there are branches and commits, and of course the actual files. Some other, mostly newer, repositories appear to work fine.

The big change that i found after some investigation is that:

The wrong repositories have the following file structure in their folder (/var/opt/gitlab/git-data/repositories/namespace/repository.git)

drwxr-sr-x 680 git root 36864 Sep 21 16:27 ..
drwxr-xr-x   2 git root  4096 Feb  3  2017 branches
-rw-r--r--   1 git root    66 Feb  3  2017 config
-rw-r--r--   1 git root    73 Feb  3  2017 description
drwxr-xr-x   4 git root  4096 Feb  3  2017 ProductService
drwxr-xr-x   8 git root  4096 Mar 20  2018 .git
-rw-r--r--   1 git root    43 Feb  3  2017 .gitignore
-rw-r--r--   1 git root    23 Feb  3  2017 HEAD
lrwxrwxrwx   1 git root    47 Feb  3  2017 hooks -> /opt/gitlab/embedded/service/gitlab-shell/hooks
drwxr-xr-x   2 git root  4096 Feb  3  2017 hooks.old.1486128784
drwxr-xr-x   4 git root  4096 Feb  3  2017 HTML
drwxr-xr-x   2 git root  4096 Feb  3  2017 info
drwxr-xr-x   4 git root  4096 Feb  3  2017 objects
drwxr-xr-x   2 git root  4096 Feb  3  2017 packages
drwxr-xr-x   4 git root  4096 Feb  3  2017 refs
drwxr-xr-x   4 git root  4096 Feb  3  2017 .vs
drwxr-xr-x   4 git root  4096 Feb  3  2017 Product
-rw-r--r--   1 git root  1944 Feb  3  2017 ProductService.sln 

As you can see, the repository has all of its files in the root, next to the object folder, which seems odd to me.

When i clone the repository, and create a new repository in gitlab (under the name repository-new) with the same files, i get the following folder structurein the .git folder.

The correct repository has the following file structure in its folder (/var/opt/gitlab/git-data/repositories/namespace/repository-new.git)

drwxr-sr-x 680 git root 36864 Sep 21 16:27 ..
-rw-r--r--   1 git root   116 Jun 11 15:35 config
-rw-r--r--   1 git root    73 Jun 11 15:35 description
-rw-r--r--   1 git root    23 Jun 11 15:35 HEAD
lrwxrwxrwx   1 git root    47 Jun 11 15:35 hooks -> /opt/gitlab/embedded/service/gitlab-shell/hooks
drwxr-xr-x   2 git root  4096 Jun 11 15:35 hooks.old.1528724138
drwxr-xr-x   2 git root  4096 Jun 11 15:35 info
drwxr-xr-x  39 git root  4096 Jul 10 12:29 objects
drwxr-xr-x   6 git root  4096 Jul 10 12:28 refs

The files are not contained directly in the root .git folder.

Does anyone know a fix for this? why is this repository differently shaped? I personally think the problem above causes the repository to appear empty in gitlab.