Skip to content

Default branch should follow upstream default branch for pull mirrors

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When mirroring a repository the default_branch doesn't get updated in Gitlab when its changed remotely.

Steps to reproduce

  • Create a new project mirroring a remote repository.
  • Verify the mirror is successful (default_branch is set)
  • Update default_branch on the remote repository
  • Manually Sync mirrored repository.

The mirror does respect the default_branch on the initial mirror/creation. So if the remote repository is set to not_master the mirror in Gitlab will match. But no updates make it in.

What is the current bug behavior?

The default branch is ignored

What is the expected correct behavior?

Default branch should match mirrored repository

Other

Looks similar to an older issue here: https://gitlab.com/gitlab-org/gitlab-ee/issues/936

Reproduced on 11.2.1

Internal ZD: https://gitlab.zendesk.com/agent/tickets/102699

Edited by 🤖 GitLab Bot 🤖