Skip to content

Commit 101075a

Browse files
committed
Merge pull request #426 from JakeGinnivan/NullReferenceExceptionFix
Fixes null ref exception when there is a remote 'develop' branch, but no...
2 parents 9bcb867 + fe043c3 commit 101075a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GitVersionCore/BranchConfigurationCalculator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
117117
else
118118
errorMessage = "Failed to inherit Increment branch configuration, ended up with: " + string.Join(", ", possibleParents.Select(p => p.Name));
119119

120-
var hasDevelop = repository.FindBranch("develop") != null;
120+
var hasDevelop = repository.Branches["develop"] != null;
121121
var branchName = hasDevelop ? "develop" : "master";
122122

123123
Logger.WriteWarning(errorMessage + Environment.NewLine + Environment.NewLine + "Falling back to " + branchName + " branch config");

0 commit comments

Comments
 (0)