Skip to content

Commit 3ecf6fa

Browse files
committed
Should match branch name only at start of line
1 parent 67be1f6 commit 3ecf6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GitVersionCore/GitVersionContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ IEnumerable<Branch> GetBranchesContainingCommit(string commitSha)
8484

8585
void AssignBranchConfiguration()
8686
{
87-
var matchingBranches = Configuration.Branches.Where(b => Regex.IsMatch(CurrentBranch.Name, b.Key)).ToArray();
87+
var matchingBranches = Configuration.Branches.Where(b => Regex.IsMatch("^" + CurrentBranch.Name, b.Key)).ToArray();
8888

8989
if (matchingBranches.Length == 0)
9090
{

0 commit comments

Comments
 (0)