Fix wrong default branch imported with Bitbucket Server
When importing a repository from Bitbucket Server where HEAD of that repo is something different than the default HEAD as created by Gitaly (which currently is "main", so it would be triggered by importing any repo whose HEAD points to "master"), then the end result is a corrupt repository. This is because the import will create repos by first calling CreateRepository, which initializes HEAD to "main", and then calling FetchRemote, which only fetches refs but won't ever update HEAD. We fix this by doing a standard import of the repository with a follow-up fetch to map the pull requests to merge request references. Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/346008 Changelog: fixed
Showing
Please register or sign in to comment