Skip to content

Cannot list tags in a repository mirror when hashed storage in use

From: https://gitlab.com/gitlab-com/infrastructure/issues/2821#note_47684308

In gitlab-ee%"10.0" we introduced "hashed storage". When enabled, rather than storing projects on disk in a location determined by project.full_path, they are now stored in @hashed/aa/bb/full-hash (e.g. Project#disk_path). The hash is generated by SHAing the project ID.

The use of full_path needs to be re-evaluated and tested.

# Can't list tags on a hashed storage repo in some circumstances?
lib/gitlab/git/repository_mirroring.rb:81:        cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{full_path} ls-remote --tags #{remote})
Edited by Stan Hu