@@ -9,14 +9,13 @@ import {
99 getIssueFromGitConfigEntityIdentifier ,
1010} from '../../plus/integrations/providers/utils' ;
1111import { Logger } from '../../system/logger' ;
12- import { PageableResult } from '../../system/paging' ;
12+ import type { PageableResult } from '../../system/paging' ;
1313import type { MaybePausedResult } from '../../system/promise' ;
1414import { getSettledValue , pauseOnCancelOrTimeout } from '../../system/promise' ;
1515import type { GitBranch } from './branch' ;
1616import type { Issue } from './issue' ;
1717import type { PullRequest } from './pullRequest' ;
1818import type { GitBranchReference , GitReference } from './reference' ;
19- import type { Repository } from './repository' ;
2019import { shortenRevision } from './revision.utils' ;
2120
2221const detachedHEADRegex = / ^ ( H E A D | \( .* \) ) $ / ;
@@ -100,9 +99,8 @@ export async function getDefaultBranchName(
10099}
101100
102101export async function getLocalBranchByUpstream (
103- repo : Repository ,
104102 remoteBranchName : string ,
105- branches ? : PageableResult < GitBranch > | Map < unknown , GitBranch > ,
103+ branches : PageableResult < GitBranch > | Map < unknown , GitBranch > ,
106104) : Promise < GitBranch | undefined > {
107105 let qualifiedRemoteBranchName ;
108106 if ( remoteBranchName . startsWith ( 'remotes/' ) ) {
@@ -112,10 +110,6 @@ export async function getLocalBranchByUpstream(
112110 qualifiedRemoteBranchName = `remotes/${ remoteBranchName } ` ;
113111 }
114112
115- branches ??= new PageableResult < GitBranch > ( p =>
116- repo . git . branches ( ) . getBranches ( p != null ? { paging : p } : undefined ) ,
117- ) ;
118-
119113 function matches ( branch : GitBranch ) : boolean {
120114 return (
121115 ! branch . remote &&
0 commit comments