@@ -55,29 +55,6 @@ public RepositoryStore(ILog log, IGitRepository repository)
5555 return currentBranch . Tip ;
5656 }
5757
58- public IEnumerable < ICommit > GetMainlineCommitLog ( ICommit ? baseVersionSource , ICommit ? mainlineTip )
59- {
60- if ( mainlineTip is null )
61- {
62- return [ ] ;
63- }
64-
65- var filter = new CommitFilter { IncludeReachableFrom = mainlineTip , ExcludeReachableFrom = baseVersionSource , SortBy = CommitSortStrategies . Reverse , FirstParentOnly = true } ;
66-
67- return this . repository . Commits . QueryBy ( filter ) ;
68- }
69-
70- public IEnumerable < ICommit > GetMergeBaseCommits ( ICommit ? mergeCommit , ICommit ? mergedHead , ICommit ? findMergeBase )
71- {
72- var filter = new CommitFilter { IncludeReachableFrom = mergedHead , ExcludeReachableFrom = findMergeBase } ;
73- var commitCollection = this . repository . Commits . QueryBy ( filter ) ;
74-
75- var commits = mergeCommit != null
76- ? new [ ] { mergeCommit } . Union ( commitCollection )
77- : commitCollection ;
78- return commits ;
79- }
80-
8158 public IBranch GetTargetBranch ( string ? targetBranchName )
8259 {
8360 // By default, we assume HEAD is pointing to the desired branch
@@ -108,35 +85,6 @@ public IBranch GetTargetBranch(string? targetBranchName)
10885
10986 public IBranch ? FindBranch ( string branchName ) => this . repository . Branches . FirstOrDefault ( x => x . Name . EquivalentTo ( branchName ) ) ;
11087
111- public IBranch ? FindMainBranch ( IGitVersionConfiguration configuration )
112- {
113- var branches = configuration . Branches ;
114- var mainBranchRegex = branches [ ConfigurationConstants . MainBranchKey ] . RegularExpression
115- ?? branches [ ConfigurationConstants . MasterBranchKey ] . RegularExpression ;
116-
117- if ( mainBranchRegex == null )
118- {
119- return FindBranch ( ConfigurationConstants . MainBranchKey ) ?? FindBranch ( ConfigurationConstants . MasterBranchKey ) ;
120- }
121-
122- return this . repository . Branches . FirstOrDefault ( b =>
123- Regex . IsMatch ( b . Name . WithoutOrigin , mainBranchRegex , RegexOptions . IgnoreCase ) ) ;
124- }
125-
126- public IEnumerable < IBranch > FindMainlineBranches ( IGitVersionConfiguration configuration )
127- {
128- configuration . NotNull ( ) ;
129-
130- foreach ( var branch in this . repository . Branches )
131- {
132- var branchConfiguration = configuration . GetBranchConfiguration ( branch . Name ) ;
133- if ( branchConfiguration . IsMainBranch == true )
134- {
135- yield return branch ;
136- }
137- }
138- }
139-
14088 public IEnumerable < IBranch > GetReleaseBranches ( IEnumerable < KeyValuePair < string , IBranchConfiguration > > releaseBranchConfig )
14189 => this . repository . Branches . Where ( b => IsReleaseBranch ( b , releaseBranchConfig ) ) ;
14290
@@ -153,12 +101,6 @@ public IEnumerable<IBranch> GetBranchesContainingCommit(ICommit commit, IEnumera
153101 return branchesContainingCommitFinder . GetBranchesContainingCommit ( commit , branches , onlyTrackedBranches ) ;
154102 }
155103
156- public IDictionary < string , List < IBranch > > GetMainlineBranches ( ICommit commit , IGitVersionConfiguration configuration )
157- {
158- var mainlineBranchFinder = new MainlineBranchFinder ( this , this . repository , configuration , this . log ) ;
159- return mainlineBranchFinder . FindMainlineBranches ( commit ) ;
160- }
161-
162104 public IEnumerable < IBranch > GetSourceBranches ( IBranch branch , IGitVersionConfiguration configuration ,
163105 params IBranch [ ] excludedBranches )
164106 => GetSourceBranches ( branch , configuration , ( IEnumerable < IBranch > ) excludedBranches ) ;
0 commit comments