@@ -13,9 +13,10 @@ import { asWinJsPromise } from 'vs/base/common/async';
1313import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' ;
1414import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands' ;
1515import { MainContext , MainThreadSCMShape , SCMRawResource , SCMRawResourceSplice , SCMRawResourceSplices , IMainContext } from './extHost.protocol' ;
16- import { sortedDiff , Splice } from 'vs/base/common/arrays' ;
16+ import { sortedDiff } from 'vs/base/common/arrays' ;
1717import { comparePaths } from 'vs/base/common/comparers' ;
1818import * as vscode from 'vscode' ;
19+ import { ISplice } from 'vs/base/common/sequence' ;
1920
2021type ProviderHandle = number ;
2122type GroupHandle = number ;
@@ -221,8 +222,8 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
221222 const snapshot = [ ...this . _resourceStates ] . sort ( compareResourceStates ) ;
222223 const diffs = sortedDiff ( this . _resourceSnapshot , snapshot , compareResourceStates ) ;
223224
224- const splices = diffs . map < Splice < { rawResource : SCMRawResource , handle : number } > > ( diff => {
225- const inserted = diff . inserted . map ( r => {
225+ const splices = diffs . map < ISplice < { rawResource : SCMRawResource , handle : number } > > ( diff => {
226+ const toInsert = diff . toInsert . map ( r => {
226227 const handle = this . _resourceHandlePool ++ ;
227228 this . _resourceStatesMap . set ( handle , r ) ;
228229
@@ -257,16 +258,16 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
257258 return { rawResource, handle } ;
258259 } ) ;
259260
260- return { start : diff . start , deleteCount : diff . deleteCount , inserted } ;
261+ return { start : diff . start , deleteCount : diff . deleteCount , toInsert } ;
261262 } ) ;
262263
263264 const rawResourceSplices = splices
264- . map ( ( { start, deleteCount, inserted } ) => [ start , deleteCount , inserted . map ( i => i . rawResource ) ] as SCMRawResourceSplice ) ;
265+ . map ( ( { start, deleteCount, toInsert } ) => [ start , deleteCount , toInsert . map ( i => i . rawResource ) ] as SCMRawResourceSplice ) ;
265266
266267 const reverseSplices = splices . reverse ( ) ;
267268
268- for ( const { start, deleteCount, inserted } of reverseSplices ) {
269- const handles = inserted . map ( i => i . handle ) ;
269+ for ( const { start, deleteCount, toInsert } of reverseSplices ) {
270+ const handles = toInsert . map ( i => i . handle ) ;
270271 const handlesToDelete = this . _handlesSnapshot . splice ( start , deleteCount , ...handles ) ;
271272
272273 for ( const handle of handlesToDelete ) {
0 commit comments