Skip to content

Commit 7919a46

Browse files
committed
Only need to get 2 possible parent because
the inherit Increment branch configuration fails if more than 1 parent.
1 parent 1f36860 commit 7919a46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/GitVersionCore/BranchConfigurationCalculator.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
8484
List<Branch> possibleParents;
8585
if (branchPoint == null)
8686
{
87-
possibleParents = currentCommit.GetBranchesContainingCommit(repository, branchesToEvaluate, true).ToList();
87+
possibleParents = currentCommit.GetBranchesContainingCommit(repository, branchesToEvaluate, true)
88+
// It fails to inherit Increment branch configuration if more than 1 parent;
89+
// therefore no point to get more than 2 parents
90+
.Take(2)
91+
.ToList();
8892
}
8993
else
9094
{

0 commit comments

Comments
 (0)