Summary
When mirroring a Gitlab repository using push mode, and only mirroring specific branches, Gitlab mirrors all branches without taking into account the regular expression defined as rule.
Steps to reproduce
-
Settings → Repository settings → Mirroring repositories
-
Set up mirror with the direction set as push, I used HTTPS with an access token.
-
Set “Mirror specific branches” to specific branches (using regular expression, i.e. “(branch_name){1}.*”)
-
GitLab self-instance version 18.0.6 , Plan: Ultimate
Observations
It seems like all branches are mirrored until a first branch matching the regular expression is found. From that moment, Gitlab pushes only the branches matching the regular expression as expected.
What is the current bug behavior?
Gitlab pushed all branches instead of the ones matching the regular expression.
What is the expected correct behavior?
Gitlab pushes only the branches matching the regular expression