@@ -4,8 +4,9 @@ import { Features } from '../../features';
44import type { GitUri } from '../../git/gitUri' ;
55import { GitBranch } from '../../git/models/branch' ;
66import { getHighlanderProviders } from '../../git/models/remote' ;
7- import type { RepositoryChangeEvent , RepositoryFileSystemChangeEvent } from '../../git/models/repository' ;
8- import { Repository , RepositoryChange , RepositoryChangeComparisonMode } from '../../git/models/repository' ;
7+ import type { Repository , RepositoryChangeEvent , RepositoryFileSystemChangeEvent } from '../../git/models/repository' ;
8+ import { RepositoryChange , RepositoryChangeComparisonMode } from '../../git/models/repository' ;
9+ import { formatLastFetched , getLastFetchedUpdateInterval } from '../../git/models/repository.utils' ;
910import type { GitStatus } from '../../git/models/status' ;
1011import { getRepositoryStatusIconPath } from '../../git/utils/vscode/icons' ;
1112import type {
@@ -205,9 +206,7 @@ export class RepositoryNode extends SubscribeableViewNode<'repository', ViewsWit
205206
206207 let description ;
207208 let tooltip = `${ this . repo . formattedName ?? this . uri . repoPath ?? '' } ${
208- lastFetched
209- ? `${ pad ( GlyphChars . Dash , 2 , 2 ) } Last fetched ${ Repository . formatLastFetched ( lastFetched , false ) } `
210- : ''
209+ lastFetched ? `${ pad ( GlyphChars . Dash , 2 , 2 ) } Last fetched ${ formatLastFetched ( lastFetched , false ) } ` : ''
211210 } ${ this . repo . formattedName ? `\\\n${ this . uri . repoPath } ` : '' } `;
212211 let workingStatus = '' ;
213212
@@ -300,7 +299,7 @@ export class RepositoryNode extends SubscribeableViewNode<'repository', ViewsWit
300299 item . id = this . id ;
301300 item . contextValue = contextValue ;
302301 item . description = `${ description ?? '' } ${
303- lastFetched ? `${ pad ( GlyphChars . Dot , 1 , 1 ) } Last fetched ${ Repository . formatLastFetched ( lastFetched ) } ` : ''
302+ lastFetched ? `${ pad ( GlyphChars . Dot , 1 , 1 ) } Last fetched ${ formatLastFetched ( lastFetched ) } ` : ''
304303 } `;
305304 item . iconPath = getRepositoryStatusIconPath ( this . view . container , this . repo , status ) ;
306305
@@ -362,12 +361,12 @@ export class RepositoryNode extends SubscribeableViewNode<'repository', ViewsWit
362361
363362 const disposables = [ weakEvent ( this . repo . onDidChange , this . onRepositoryChanged , this ) ] ;
364363
365- const interval = Repository . getLastFetchedUpdateInterval ( lastFetched ) ;
364+ const interval = getLastFetchedUpdateInterval ( lastFetched ) ;
366365 if ( lastFetched !== 0 && interval > 0 ) {
367366 disposables . push (
368367 disposableInterval ( ( ) => {
369368 // Check if the interval should change, and if so, reset it
370- if ( interval !== Repository . getLastFetchedUpdateInterval ( lastFetched ) ) {
369+ if ( interval !== getLastFetchedUpdateInterval ( lastFetched ) ) {
371370 void this . resetSubscription ( ) ;
372371 }
373372
0 commit comments