@@ -6,7 +6,7 @@ import { openFolderCompare } from '../git/actions/commit';
66import { GitUri } from '../git/gitUri' ;
77import { shortenRevision } from '../git/utils/revision.utils' ;
88import { showGenericErrorMessage } from '../messages' ;
9- import { ReferencesQuickPickIncludes , showReferencePicker } from '../quickpicks/referencePicker' ;
9+ import { showReferencePicker2 } from '../quickpicks/referencePicker' ;
1010import { getBestRepositoryOrShowPicker } from '../quickpicks/repositoryPicker' ;
1111import { command } from '../system/-webview/command' ;
1212import { isFolderUri } from '../system/-webview/path' ;
@@ -55,24 +55,24 @@ export class DiffFolderWithRevisionFromCommand extends ActiveEditorCommand {
5555 const gitUri = await GitUri . fromUri ( uri ) ;
5656 args . rhs = gitUri . sha ?? '' ;
5757 } else {
58- const pick = await showReferencePicker (
58+ const result = await showReferencePicker2 (
5959 repoPath ,
6060 `Open Folder Changes with Branch or Tag${ pad ( GlyphChars . Dot , 2 , 2 ) } ${ relativePath } ` ,
6161 'Choose a reference (branch, tag, etc) to compare' ,
6262 {
6363 allowedAdditionalInput : { rev : true } ,
64- include : ReferencesQuickPickIncludes . All ,
64+ include : [ 'branches' , 'tags' , 'workingTree' , 'HEAD' ] ,
6565 sort : { branches : { current : true } , tags : { } } ,
6666 } ,
6767 ) ;
68- if ( pick ?. ref == null ) return ;
68+ if ( result . value ?. ref == null ) return ;
6969
70- args . rhs = pick . ref ;
70+ args . rhs = result . value . ref ;
7171 }
7272 }
7373
7474 if ( ! args . lhs ) {
75- const pick = await showReferencePicker (
75+ const result = await showReferencePicker2 (
7676 repoPath ,
7777 `Open Folder Changes with Branch or Tag${ pad ( GlyphChars . Dot , 2 , 2 ) } ${ relativePath } ${
7878 args . rhs ? ` at ${ shortenRevision ( args . rhs ) } ` : ''
@@ -82,13 +82,13 @@ export class DiffFolderWithRevisionFromCommand extends ActiveEditorCommand {
8282 allowedAdditionalInput : { rev : true } ,
8383 include :
8484 args . rhs === ''
85- ? ReferencesQuickPickIncludes . All & ~ ReferencesQuickPickIncludes . WorkingTree
86- : ReferencesQuickPickIncludes . All ,
85+ ? [ 'branches' , 'tags' , 'HEAD' ]
86+ : [ 'branches' , 'tags' , 'workingTree' , 'HEAD' ] ,
8787 } ,
8888 ) ;
89- if ( pick ?. ref == null ) return ;
89+ if ( result . value ?. ref == null ) return ;
9090
91- args . lhs = pick . ref ;
91+ args . lhs = result . value . ref ;
9292
9393 // If we are trying to compare to the working tree, swap the lhs and rhs
9494 if ( args . rhs !== '' && args . lhs === '' ) {
0 commit comments