@@ -56,7 +56,9 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
56
56
excludedInheritBranches = repository . Branches . Where ( b =>
57
57
{
58
58
var branchConfig = LookupBranchConfiguration ( config , b ) ;
59
- return branchConfig . Length == 1 && branchConfig [ 0 ] . Value . Increment == IncrementStrategy . Inherit ;
59
+ // TODO: I don't this there's the branch if no branchConfig exists?
60
+ // TODO: we should probably warn if we find more than one branch config?
61
+ return ( branchConfig . Length != 1 ) || ( branchConfig . Length == 1 && branchConfig [ 0 ] . Value . Increment == IncrementStrategy . Inherit ) ;
60
62
} ) . ToList ( ) ;
61
63
}
62
64
excludedBranches . ToList ( ) . ForEach ( excludedInheritBranches . Add ) ;
@@ -66,14 +68,14 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
66
68
List < Branch > possibleParents ;
67
69
if ( branchPoint == null )
68
70
{
69
- possibleParents = currentCommit . GetBranchesContainingCommit ( repository , true ) . Except ( excludedInheritBranches ) . ToList ( ) ;
71
+ possibleParents = currentCommit . GetBranchesContainingCommit ( repository , true , excludedInheritBranches ) . ToList ( ) ;
70
72
}
71
73
else
72
74
{
73
- var branches = branchPoint . GetBranchesContainingCommit ( repository , true ) . Except ( excludedInheritBranches ) . ToList ( ) ;
75
+ var branches = branchPoint . GetBranchesContainingCommit ( repository , true , excludedInheritBranches ) . ToList ( ) ;
74
76
if ( branches . Count > 1 )
75
77
{
76
- var currentTipBranches = currentCommit . GetBranchesContainingCommit ( repository , true ) . Except ( excludedInheritBranches ) . ToList ( ) ;
78
+ var currentTipBranches = currentCommit . GetBranchesContainingCommit ( repository , true , excludedInheritBranches ) . ToList ( ) ;
77
79
possibleParents = branches . Except ( currentTipBranches ) . ToList ( ) ;
78
80
}
79
81
else
0 commit comments