@@ -238,6 +238,18 @@ export class LineAnnotationController implements Disposable {
238238
239239 let uncommittedOnly = true ;
240240
241+ let hoverOptions : RequireSome < Parameters < typeof detailsMessage > [ 4 ] , 'autolinks' | 'pullRequests' > | undefined ;
242+ // Live Share (vsls schemes) don't support `languages.registerHoverProvider` so we'll need to add them to the decoration directly
243+ if ( editor . document . uri . scheme === Schemes . Vsls || editor . document . uri . scheme === Schemes . VslsScc ) {
244+ const hoverCfg = configuration . get ( 'hovers' ) ;
245+ hoverOptions = {
246+ autolinks : hoverCfg . autolinks . enabled ,
247+ dateFormat : configuration . get ( 'defaultDateFormat' ) ,
248+ format : hoverCfg . detailsMarkdownFormat ,
249+ pullRequests : hoverCfg . pullRequests . enabled ,
250+ } ;
251+ }
252+
241253 const commitPromises = new Map < string , Promise < void > > ( ) ;
242254 const lines = new Map < number , LineState > ( ) ;
243255 for ( const selection of selections ) {
@@ -247,7 +259,8 @@ export class LineAnnotationController implements Disposable {
247259 continue ;
248260 }
249261
250- if ( state . commit . message == null && ! commitPromises . has ( state . commit . ref ) ) {
262+ // Only ensure the full details if we have to add the hover eagerly (Live Share) and we don't have a message
263+ if ( hoverOptions != null && state . commit . message == null && ! commitPromises . has ( state . commit . ref ) ) {
251264 commitPromises . set ( state . commit . ref , state . commit . ensureFullDetails ( ) ) ;
252265 }
253266 lines . set ( selection . active , state ) ;
@@ -258,18 +271,6 @@ export class LineAnnotationController implements Disposable {
258271
259272 const repoPath = trackedDocument . uri . repoPath ;
260273
261- let hoverOptions : RequireSome < Parameters < typeof detailsMessage > [ 4 ] , 'autolinks' | 'pullRequests' > | undefined ;
262- // Live Share (vsls schemes) don't support `languages.registerHoverProvider` so we'll need to add them to the decoration directly
263- if ( editor . document . uri . scheme === Schemes . Vsls || editor . document . uri . scheme === Schemes . VslsScc ) {
264- const hoverCfg = configuration . get ( 'hovers' ) ;
265- hoverOptions = {
266- autolinks : hoverCfg . autolinks . enabled ,
267- dateFormat : configuration . get ( 'defaultDateFormat' ) ,
268- format : hoverCfg . detailsMarkdownFormat ,
269- pullRequests : hoverCfg . pullRequests . enabled ,
270- } ;
271- }
272-
273274 const getPullRequests =
274275 ! uncommittedOnly &&
275276 repoPath != null &&
0 commit comments