Skip to content

Commit 5765f74

Browse files
committed
Name FindCommitBranchWasBranchedFrom to FindCommitBranchBranchedFrom
1 parent e736e14 commit 5765f74

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ public void FindCommitBranchWasBranchedFromShouldReturnNullIfTheRemoteIsTheOnlyS
227227
branch.ShouldNotBeNull();
228228

229229
var configuration = GitFlowConfigurationBuilder.New.Build();
230-
var branchedCommit = gitRepoMetadataProvider.FindCommitBranchWasBranchedFrom(branch, configuration, []);
230+
var branchedCommit = gitRepoMetadataProvider.FindCommitBranchBranchedFrom(branch, configuration, []);
231231
branchedCommit.ShouldBe(BranchCommit.Empty);
232232

233-
var branchedCommits = gitRepoMetadataProvider.FindCommitBranchesWasBranchedFrom(branch, configuration).ToArray();
233+
var branchedCommits = gitRepoMetadataProvider.FindCommitBranchesBranchedFrom(branch, configuration).ToArray();
234234
branchedCommits.ShouldBeEmpty();
235235
}
236236
}

src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public interface IRepositoryStore
2727
/// Find the commit where the given branch was branched from another branch.
2828
/// If there are multiple such commits and branches, tries to guess based on commit histories.
2929
/// </summary>
30-
BranchCommit FindCommitBranchWasBranchedFrom(IBranch? branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches);
30+
BranchCommit FindCommitBranchBranchedFrom(IBranch? branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches);
3131

32-
IEnumerable<BranchCommit> FindCommitBranchesWasBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches);
32+
IEnumerable<BranchCommit> FindCommitBranchesBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches);
3333

34-
IEnumerable<BranchCommit> FindCommitBranchesWasBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, IEnumerable<IBranch> excludedBranches);
34+
IEnumerable<BranchCommit> FindCommitBranchesBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, IEnumerable<IBranch> excludedBranches);
3535

3636
IEnumerable<IBranch> GetSourceBranches(IBranch branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches);
3737

src/GitVersion.Core/Core/MainlineBranchFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public BranchCommit BranchOrigin(IBranch branch)
8383
return mergeBase;
8484
}
8585

86-
var branchCommit = this.repositoryStore.FindCommitBranchWasBranchedFrom(branch, this.configuration);
86+
var branchCommit = this.repositoryStore.FindCommitBranchBranchedFrom(branch, this.configuration);
8787
if (branchCommit != BranchCommit.Empty)
8888
{
8989
this.log.Info($"Found parent commit {branchCommit.Commit.Sha} for '{branchName}'.");

src/GitVersion.Core/Core/RepositoryStore.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public IEnumerable<IBranch> GetSourceBranches(
113113

114114
var referenceLookup = this.repository.Refs.ToLookup(r => r.TargetIdentifier);
115115

116-
var commitBranches = FindCommitBranchesWasBranchedFrom(branch, configuration, excludedBranches).ToHashSet();
116+
var commitBranches = FindCommitBranchesBranchedFrom(branch, configuration, excludedBranches).ToHashSet();
117117

118118
var ignore = new HashSet<BranchCommit>();
119119
foreach (var commitBranch in commitBranches)
@@ -174,7 +174,7 @@ public IEnumerable<IBranch> GetSourceBranches(
174174
/// Find the commit where the given branch was branched from another branch.
175175
/// If there are multiple such commits and branches, tries to guess based on commit histories.
176176
/// </summary>
177-
public BranchCommit FindCommitBranchWasBranchedFrom(IBranch? branch, IGitVersionConfiguration configuration,
177+
public BranchCommit FindCommitBranchBranchedFrom(IBranch? branch, IGitVersionConfiguration configuration,
178178
params IBranch[] excludedBranches)
179179
{
180180
branch = branch.NotNull();
@@ -203,10 +203,12 @@ public BranchCommit FindCommitBranchWasBranchedFrom(IBranch? branch, IGitVersion
203203
}
204204
}
205205

206-
public IEnumerable<BranchCommit> FindCommitBranchesWasBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches)
207-
=> FindCommitBranchesWasBranchedFrom(branch, configuration, (IEnumerable<IBranch>)excludedBranches);
206+
public IEnumerable<BranchCommit> FindCommitBranchesBranchedFrom(
207+
IBranch branch, IGitVersionConfiguration configuration, params IBranch[] excludedBranches)
208+
=> FindCommitBranchesBranchedFrom(branch, configuration, (IEnumerable<IBranch>)excludedBranches);
208209

209-
public IEnumerable<BranchCommit> FindCommitBranchesWasBranchedFrom(IBranch branch, IGitVersionConfiguration configuration, IEnumerable<IBranch> excludedBranches)
210+
public IEnumerable<BranchCommit> FindCommitBranchesBranchedFrom(
211+
IBranch branch, IGitVersionConfiguration configuration, IEnumerable<IBranch> excludedBranches)
210212
{
211213
using (this.log.IndentLog($"Finding branches source of '{branch}'"))
212214
{

src/GitVersion.Core/PublicAPI.Unshipped.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ GitVersion.Common.IRepositoryStore
2525
GitVersion.Common.IRepositoryStore.ExcludingBranches(System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>! branchesToExclude) -> System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>!
2626
GitVersion.Common.IRepositoryStore.FindBranch(GitVersion.Git.ReferenceName! branchName) -> GitVersion.Git.IBranch?
2727
GitVersion.Common.IRepositoryStore.FindBranch(string! branchName) -> GitVersion.Git.IBranch?
28-
GitVersion.Common.IRepositoryStore.FindCommitBranchesWasBranchedFrom(GitVersion.Git.IBranch! branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, params GitVersion.Git.IBranch![]! excludedBranches) -> System.Collections.Generic.IEnumerable<GitVersion.Git.BranchCommit>!
29-
GitVersion.Common.IRepositoryStore.FindCommitBranchesWasBranchedFrom(GitVersion.Git.IBranch! branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>! excludedBranches) -> System.Collections.Generic.IEnumerable<GitVersion.Git.BranchCommit>!
30-
GitVersion.Common.IRepositoryStore.FindCommitBranchWasBranchedFrom(GitVersion.Git.IBranch? branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, params GitVersion.Git.IBranch![]! excludedBranches) -> GitVersion.Git.BranchCommit
28+
GitVersion.Common.IRepositoryStore.FindCommitBranchBranchedFrom(GitVersion.Git.IBranch? branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, params GitVersion.Git.IBranch![]! excludedBranches) -> GitVersion.Git.BranchCommit
29+
GitVersion.Common.IRepositoryStore.FindCommitBranchesBranchedFrom(GitVersion.Git.IBranch! branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, params GitVersion.Git.IBranch![]! excludedBranches) -> System.Collections.Generic.IEnumerable<GitVersion.Git.BranchCommit>!
30+
GitVersion.Common.IRepositoryStore.FindCommitBranchesBranchedFrom(GitVersion.Git.IBranch! branch, GitVersion.Configuration.IGitVersionConfiguration! configuration, System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>! excludedBranches) -> System.Collections.Generic.IEnumerable<GitVersion.Git.BranchCommit>!
3131
GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.IBranch? branch, GitVersion.Git.IBranch? otherBranch) -> GitVersion.Git.ICommit?
3232
GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.ICommit! commit, GitVersion.Git.ICommit! mainlineTip) -> GitVersion.Git.ICommit?
3333
GitVersion.Common.IRepositoryStore.GetBranchesContainingCommit(GitVersion.Git.ICommit! commit, System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>? branches = null, bool onlyTrackedBranches = false) -> System.Collections.Generic.IEnumerable<GitVersion.Git.IBranch!>!
@@ -829,4 +829,4 @@ static readonly GitVersion.Git.BranchCommit.Empty -> GitVersion.Git.BranchCommit
829829
static readonly GitVersion.Helpers.Disposable.Empty -> System.IDisposable!
830830
static readonly GitVersion.SemanticVersion.Empty -> GitVersion.SemanticVersion!
831831
static readonly GitVersion.SemanticVersionBuildMetaData.Empty -> GitVersion.SemanticVersionBuildMetaData!
832-
static readonly GitVersion.SemanticVersionPreReleaseTag.Empty -> GitVersion.SemanticVersionPreReleaseTag!
832+
static readonly GitVersion.SemanticVersionPreReleaseTag.Empty -> GitVersion.SemanticVersionPreReleaseTag!

src/GitVersion.Core/VersionCalculation/VersionSearchStrategies/TrunkBasedVersionStrategy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private IReadOnlyDictionary<ICommit, EffectiveBranchConfiguration> GetCommitsWas
230230
var branch = repositoryStore.FindBranch(branchName);
231231
if (branch is null) return result;
232232

233-
var branchCommits = repositoryStore.FindCommitBranchesWasBranchedFrom(
233+
var branchCommits = repositoryStore.FindCommitBranchesBranchedFrom(
234234
branch, Context.Configuration
235235
).ToList();
236236

src/GitVersion.Core/VersionCalculation/VersionSearchStrategies/VersionInBranchNameVersionStrategy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public bool TryGetBaseVersion(EffectiveBranchConfiguration configuration, [NotNu
4040
return false;
4141

4242
Lazy<BranchCommit> commitBranchWasBranchedFrom = new(
43-
() => this.repositoryStore.FindCommitBranchWasBranchedFrom(configuration.Branch, Context.Configuration)
43+
() => this.repositoryStore.FindCommitBranchBranchedFrom(configuration.Branch, Context.Configuration)
4444
);
4545
foreach (var branch in new[] { Context.CurrentBranch, configuration.Branch })
4646
{

0 commit comments

Comments
 (0)