File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -203,15 +203,17 @@ export async function showReferencePicker2(
203203async function getItems ( repoPath : string , options ?: ReferencesQuickPickOptions ) : Promise < ReferencesQuickPickItem [ ] > {
204204 const include = options ?. include ?? ReferencesQuickPickIncludes . BranchesAndTags ;
205205
206+ const includes : ( 'branches' | 'tags' ) [ ] = [ ] ;
207+ if ( include & ReferencesQuickPickIncludes . Branches ) {
208+ includes . push ( 'branches' ) ;
209+ }
210+ if ( include & ReferencesQuickPickIncludes . Tags ) {
211+ includes . push ( 'tags' ) ;
212+ }
213+
206214 const items : ReferencesQuickPickItem [ ] = await getBranchesAndOrTags (
207215 Container . instance . git . getRepository ( repoPath ) ,
208- include && ReferencesQuickPickIncludes . BranchesAndTags
209- ? [ 'branches' , 'tags' ]
210- : include && ReferencesQuickPickIncludes . Branches
211- ? [ 'branches' ]
212- : include && ReferencesQuickPickIncludes . Tags
213- ? [ 'tags' ]
214- : [ ] ,
216+ includes ,
215217 {
216218 buttons : [ RevealInSideBarQuickInputButton ] ,
217219 filter : options ?. filter ,
You can’t perform that action at this time.
0 commit comments