@@ -4,7 +4,7 @@ import { configuration } from '../system/-webview/configuration';
44import { log } from '../system/decorators/log' ;
55import type { PromiseOrValue } from '../system/promise' ;
66import { PathTrie } from '../system/trie' ;
7- import type { GitCaches , GitDir , PagedResult } from './gitProvider' ;
7+ import type { CachedGitTypes , GitDir , PagedResult } from './gitProvider' ;
88import type { GitBranch } from './models/branch' ;
99import type { GitContributor } from './models/contributor' ;
1010import type { GitPausedOperationStatus } from './models/pausedOperationStatus' ;
@@ -41,7 +41,7 @@ export class GitCache implements Disposable {
4141 }
4242 } ) ,
4343 container . events . on ( 'git:cache:reset' , e =>
44- this . clearCaches ( e . data . repoPath , ...( e . data . caches ?? emptyArray ) ) ,
44+ this . clearCaches ( e . data . repoPath , ...( e . data . types ?? emptyArray ) ) ,
4545 ) ,
4646 ) ;
4747 }
@@ -118,44 +118,44 @@ export class GitCache implements Disposable {
118118 }
119119
120120 @log ( { singleLine : true } )
121- clearCaches ( repoPath : string | undefined , ...caches : GitCaches [ ] ) : void {
121+ clearCaches ( repoPath : string | undefined , ...types : CachedGitTypes [ ] ) : void {
122122 const cachesToClear = new Set < Map < string , unknown > | PathTrie < unknown > | undefined > ( ) ;
123123
124- if ( ! caches . length || caches . includes ( 'branches' ) ) {
124+ if ( ! types . length || types . includes ( 'branches' ) ) {
125125 cachesToClear . add ( this . _branchCache ) ;
126126 cachesToClear . add ( this . _branchesCache ) ;
127127 }
128128
129- if ( ! caches . length || caches . includes ( 'contributors' ) ) {
129+ if ( ! types . length || types . includes ( 'contributors' ) ) {
130130 cachesToClear . add ( this . _contributorsCache ) ;
131131 }
132132
133- if ( ! caches . length || caches . includes ( 'remotes' ) ) {
133+ if ( ! types . length || types . includes ( 'remotes' ) ) {
134134 cachesToClear . add ( this . _remotesCache ) ;
135135 cachesToClear . add ( this . _bestRemotesCache ) ;
136136 }
137137
138- if ( ! caches . length || caches . includes ( 'providers' ) ) {
138+ if ( ! types . length || types . includes ( 'providers' ) ) {
139139 cachesToClear . add ( this . _bestRemotesCache ) ;
140140 }
141141
142- if ( ! caches . length || caches . includes ( 'stashes' ) ) {
142+ if ( ! types . length || types . includes ( 'stashes' ) ) {
143143 cachesToClear . add ( this . _stashesCache ) ;
144144 }
145145
146- if ( ! caches . length || caches . includes ( 'status' ) ) {
146+ if ( ! types . length || types . includes ( 'status' ) ) {
147147 cachesToClear . add ( this . _pausedOperationStatusCache ) ;
148148 }
149149
150- if ( ! caches . length || caches . includes ( 'tags' ) ) {
150+ if ( ! types . length || types . includes ( 'tags' ) ) {
151151 cachesToClear . add ( this . _tagsCache ) ;
152152 }
153153
154- if ( ! caches . length || caches . includes ( 'worktrees' ) ) {
154+ if ( ! types . length || types . includes ( 'worktrees' ) ) {
155155 cachesToClear . add ( this . _worktreesCache ) ;
156156 }
157157
158- if ( ! caches . length ) {
158+ if ( ! types . length ) {
159159 cachesToClear . add ( this . _repoInfoCache ) ;
160160 cachesToClear . add ( this . _trackedPaths ) ;
161161 }
0 commit comments