@@ -4,7 +4,7 @@ import type { Container } from '../container';
44import { GitUri } from '../git/gitUri' ;
55import { showGenericErrorMessage } from '../messages' ;
66import type { AIExplainSource } from '../plus/ai/aiProviderService' ;
7- import { ReferencesQuickPickIncludes , showReferencePicker } from '../quickpicks/referencePicker ' ;
7+ import { showCommitPicker } from '../quickpicks/commitPicker ' ;
88import { getBestRepositoryOrShowPicker } from '../quickpicks/repositoryPicker' ;
99import { command } from '../system/-webview/command' ;
1010import { showMarkdownPreview } from '../system/-webview/markdown' ;
@@ -63,18 +63,11 @@ export class ExplainCommitCommand extends GlCommandBase {
6363 try {
6464 // If no ref is provided, show a picker to select a commit
6565 if ( args . ref == null ) {
66- const pick = await showReferencePicker (
67- repository . path ,
68- 'Explain Commit' ,
69- 'Choose a commit to explain' ,
70- {
71- allowRevisions : true ,
72- include : ReferencesQuickPickIncludes . BranchesAndTags ,
73- sort : { branches : { current : true } , tags : { } } ,
74- } ,
75- ) ;
76- if ( pick ?. ref == null ) return ;
77- args . ref = pick . ref ;
66+ const commitsProvider = repository . git . commits ( ) ;
67+ const log = await commitsProvider . getLog ( ) ;
68+ const pick = await showCommitPicker ( log , 'Explain Commit' , 'Choose a commit to explain' ) ;
69+ if ( pick ?. sha == null ) return ;
70+ args . ref = pick . sha ;
7871 }
7972
8073 // Get the commit
0 commit comments