@@ -8,12 +8,13 @@ import { localize } from 'vs/nls';
88import { matchesContiguousSubString } from 'vs/base/common/filters' ;
99import { TPromise } from 'vs/base/common/winjs.base' ;
1010import Severity from 'vs/base/common/severity' ;
11- import { IGitService , RefType , IRef } from 'vs/workbench/parts/git/common/git' ;
11+ import { IGitService , RefType , IRef , IGitConfiguration } from 'vs/workbench/parts/git/common/git' ;
1212import { ICommand , CommandQuickOpenHandler } from 'vs/workbench/browser/quickopen' ;
1313import { Mode } from 'vs/base/parts/quickopen/common/quickOpen' ;
1414import { QuickOpenEntry , IHighlight , IContext , QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel' ;
1515import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen' ;
1616import { IMessageService } from 'vs/platform/message/common/message' ;
17+ import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
1718
1819class AbstractRefEntry extends QuickOpenEntry {
1920
@@ -130,14 +131,15 @@ class CheckoutCommand implements ICommand {
130131 aliases = [ 'checkout' , 'co' ] ;
131132 icon = 'git' ;
132133
133- constructor ( private gitService : IGitService , private messageService : IMessageService ) {
134+ constructor ( private gitService : IGitService , private messageService : IMessageService , private configurationService : IConfigurationService ) {
134135 // noop
135136 }
136137
137138 getResults ( input : string ) : TPromise < QuickOpenEntry [ ] > {
138139 input = input . trim ( ) ;
139140
140- const checkoutType = this . gitService . checkoutType ;
141+ const config = this . configurationService . getConfiguration < IGitConfiguration > ( 'git' ) ;
142+ const checkoutType = config . checkoutType ;
141143 const includeTags = checkoutType === 'all' || checkoutType === 'tags' ;
142144 const includeRemotes = checkoutType === 'all' || checkoutType === 'remote' ;
143145
@@ -252,11 +254,16 @@ class BranchCommand implements ICommand {
252254
253255export class GitCommandQuickOpenHandler extends CommandQuickOpenHandler {
254256
255- constructor ( @IQuickOpenService quickOpenService : IQuickOpenService , @IGitService gitService : IGitService , @IMessageService messageService : IMessageService ) {
257+ constructor (
258+ @IQuickOpenService quickOpenService : IQuickOpenService ,
259+ @IGitService gitService : IGitService ,
260+ @IMessageService messageService : IMessageService ,
261+ @IConfigurationService configurationService : IConfigurationService
262+ ) {
256263 super ( quickOpenService , {
257264 prefix : 'git' ,
258265 commands : [
259- new CheckoutCommand ( gitService , messageService ) ,
266+ new CheckoutCommand ( gitService , messageService , configurationService ) ,
260267 new BranchCommand ( gitService , messageService )
261268 ]
262269 } ) ;
0 commit comments