Git Reporsitory, Branch Pattern matching

Hi all,

i habe a slight problem using the Branch Pattern Matching for a git repository.

We have a set of branches, that are below 6.3 on the root level of the git repository, eh. “6.3/develop”, “6.3/master”, “6.3/bla”, “6.3/blubb”. Also there is a bunch of other branches that i do not want to see in this repository configuration…

Using a Regex Tester i came up with “[6][.][3]" as the pattern to match, but it does not work, it still displays all branches, i also tried "6.3” but then it would not show anything…

Any Ideas?

Thanks a lot
Holger

Hi Holger,

Try this pattern:

^6.3/.+

See in Regex Storm or Regex 101

Square brackets define sets in regular expressions, e.g. “[abc]” means “a”, “b” or “c”, so these are redundant in your pattern. The “*” means zero or more of the previous character so your expression means: “6” followed by “.” followed by “3” zero or more times so this will match anything containing the string "6."

The pattern above matches a string starting with “6” followed by “.” followed by “3” followed by “/” followed by one or more of any character.

Hi Dave,

thanks for your effort, looks like i should have paid more attention when this was a topic in class

Hi Holger,

We noticed today that the git branches filter was not being used on the first set of changesets after a reset. There is a fix for this in the latest version.

This does not really explain why you would get the opposite behaviour with your regex pattern. If this is still happening after installing the latest version, can you provide full details of your repository settings, either dialog screenshots or a diagnostics report which can from the Event Log page in the Administration section of Continua CI?


Hi Dave,

well apparently i put your Regex into a different Repository by accident, there it works… I have no idea why and sadly right now (since it is working) i have not the time to look at the other repositoy. I will get back to this as soon as i can.

Thanks a lot!
Holger