Skip to content

Commit 7ce9d46

Browse files
committed
Mark default branch config with isDevelop
1 parent 0acdd62 commit 7ce9d46

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/GitVersionCore/BranchConfigurationCalculator.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
namespace GitVersion
22
{
3+
using JetBrains.Annotations;
4+
using LibGit2Sharp;
35
using System;
46
using System.Collections.Generic;
57
using System.Linq;
68
using System.Text.RegularExpressions;
79

8-
using JetBrains.Annotations;
9-
10-
using LibGit2Sharp;
11-
1210
public class BranchConfigurationCalculator
1311
{
1412
public static KeyValuePair<string, BranchConfig> GetBranchConfiguration(Commit currentCommit, IRepository repository, bool onlyEvaluateTrackedBranches, Config config, Branch currentBranch, IList<Branch> excludedInheritBranches = null)
@@ -18,7 +16,7 @@ public static KeyValuePair<string, BranchConfig> GetBranchConfiguration(Commit c
1816
if (matchingBranches.Length == 0)
1917
{
2018
var branchConfig = new BranchConfig();
21-
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig);
19+
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig, isDevelop: true);
2220
return new KeyValuePair<string, BranchConfig>(string.Empty, branchConfig);
2321
}
2422
if (matchingBranches.Length == 1)
@@ -44,12 +42,12 @@ static KeyValuePair<string, BranchConfig>[] LookupBranchConfiguration([NotNull]
4442
{
4543
throw new ArgumentNullException("config");
4644
}
47-
45+
4846
if (currentBranch == null)
4947
{
5048
throw new ArgumentNullException("currentBranch");
5149
}
52-
50+
5351
return config.Branches.Where(b => Regex.IsMatch(currentBranch.FriendlyName, "^" + b.Key, RegexOptions.IgnoreCase)).ToArray();
5452
}
5553

0 commit comments

Comments
 (0)