#Mirroring repositories: expect branch x

8 messages · Page 1 of 1 (latest)

lusty vault
#

Is there a way to use the mirroring repositories feature to mirror anything other than branch x?

loud sand
#

There is a mirror_branch_regex that you could potentially be able to use for this, but it would have to be all-inclusive of the branches you wanted to mirror.

lusty vault
#

Ah, thanks! I had the hope for a sec I'd use neagtiv parameters like ^(?:(?!branchNameX).)*$

loud sand
#

it's possible you could try a negative lookahead in regex, but I don't know if those are supported by the underlying regex method GitLab uses. They're not universally supported

#

that's pretty similar to the regex you just posted 🙂

lusty vault
#

It was worth a try :D

loud sand
#

Ah, yep, there ya go 🙂

#

You could also potentially protect most of the refs, and use the only mirror protected refs setting, though that's a.... weird use of protected refs