@@ -9,9 +9,9 @@ import * as path from 'path';
99import { commands , Disposable , LineChange , MessageOptions , OutputChannel , Position , ProgressLocation , QuickPickItem , Range , SourceControlResourceState , TextDocumentShowOptions , TextEditor , Uri , ViewColumn , window , workspace , WorkspaceEdit , WorkspaceFolder , TimelineItem , env , QuickPick } from 'vscode' ;
1010import TelemetryReporter from 'vscode-extension-telemetry' ;
1111import * as nls from 'vscode-nls' ;
12- import { Branch , GitErrorCodes , Ref , RefType , Status , CommitOptions } from './api/git' ;
12+ import { Branch , GitErrorCodes , Ref , RefType , Status , CommitOptions , RemoteSourceProvider , RemoteSource } from './api/git' ;
1313import { ForcePushMode , Git , Stash } from './git' ;
14- import { Model , RemoteProvider , Remote } from './model' ;
14+ import { Model } from './model' ;
1515import { Repository , Resource , ResourceGroupType } from './repository' ;
1616import { applyLineChanges , getModifiedRange , intersectDiffWithRange , invertLineChange , toLineRanges } from './staging' ;
1717import { fromGitUri , toGitUri , isGitUri } from './uri' ;
@@ -245,11 +245,11 @@ async function getQuickPickResult<T extends QuickPickItem>(quickpick: QuickPick<
245245 return result ;
246246}
247247
248- class RemoteProviderQuickPick {
248+ class RemoteSourceProviderQuickPick {
249249
250- private quickpick : QuickPick < QuickPickItem & { remote ?: Remote } > ;
250+ private quickpick : QuickPick < QuickPickItem & { remoteSource ?: RemoteSource } > ;
251251
252- constructor ( private provider : RemoteProvider ) {
252+ constructor ( private provider : RemoteSourceProvider ) {
253253 this . quickpick = window . createQuickPick ( ) ;
254254 this . quickpick . ignoreFocusOut = true ;
255255
@@ -269,27 +269,27 @@ class RemoteProviderQuickPick {
269269 @throttle
270270 async query ( ) : Promise < void > {
271271 this . quickpick . busy = true ;
272- const remotes = await this . provider . getRemotes ( this . quickpick . value ) ;
272+ const remoteSources = await this . provider . getRemoteSources ( this . quickpick . value ) || [ ] ;
273273 this . quickpick . busy = false ;
274274
275- if ( remotes . length === 0 ) {
275+ if ( remoteSources . length === 0 ) {
276276 this . quickpick . items = [ {
277277 label : localize ( 'none found' , "No remote repositories found." ) ,
278278 alwaysShow : true
279279 } ] ;
280280 } else {
281- this . quickpick . items = remotes . map ( remote => ( {
282- label : remote . name ,
283- description : remote . url ,
284- remote
281+ this . quickpick . items = remoteSources . map ( remoteSource => ( {
282+ label : remoteSource . name ,
283+ description : remoteSource . url ,
284+ remote : remoteSource
285285 } ) ) ;
286286 }
287287 }
288288
289- async pick ( ) : Promise < Remote | undefined > {
289+ async pick ( ) : Promise < RemoteSource | undefined > {
290290 this . query ( ) ;
291291 const result = await getQuickPickResult ( this . quickpick ) ;
292- return result ?. remote ;
292+ return result ?. remoteSource ;
293293 }
294294}
295295
@@ -514,7 +514,7 @@ export class CommandCenter {
514514 @command ( 'git.clone' )
515515 async clone ( url ?: string , parentPath ?: string ) : Promise < void > {
516516 if ( ! url ) {
517- const quickpick = window . createQuickPick < ( QuickPickItem & { provider ?: RemoteProvider } ) > ( ) ;
517+ const quickpick = window . createQuickPick < ( QuickPickItem & { provider ?: RemoteSourceProvider } ) > ( ) ;
518518 quickpick . ignoreFocusOut = true ;
519519
520520 const providers = this . model . getRemoteProviders ( )
@@ -544,7 +544,7 @@ export class CommandCenter {
544544
545545 if ( result ) {
546546 if ( result . provider ) {
547- const quickpick = new RemoteProviderQuickPick ( result . provider ) ;
547+ const quickpick = new RemoteSourceProviderQuickPick ( result . provider ) ;
548548 const remote = await quickpick . pick ( ) ;
549549 url = remote ?. url ;
550550 } else {
0 commit comments