@@ -6946,52 +6946,7 @@ describe("Windows long path configuration", () => {
69466946 } ) ;
69476947} ) ;
69486948
6949- // The listing walks the whole untracked tree before the 5,000-path cap applies, so a folder
6950- // that failed once costs the same on every status poll. Branch totals remember the failure and
6951- // back off until the untracked roots change.
69526949it . layer ( layerTest ) ( "branch change totals after a failed untracked listing" , ( it ) => {
6953- // A listing that fails (here: output past the limit) backs off like one over the cap.
6954- it . effect ( "do not repeat an untracked listing that failed" , ( ) =>
6955- Effect . gen ( function * ( ) {
6956- const fs = yield * FileSystem . FileSystem ;
6957- const path = yield * Path . Path ;
6958- const cwd = yield * makeTmpDir ( "git-untracked-error-" ) ;
6959- yield * initRepoWithCommit ( cwd ) ;
6960- yield * fs . writeFileString ( path . join ( cwd , "untracked.txt" ) , "new\n" ) ;
6961- let listings = 0 ;
6962- const delegate = yield * ChildProcessSpawner . ChildProcessSpawner ;
6963- // Stands in for a listing that floods its output past the 16 MiB limit.
6964- const flood = ChildProcess . make ( process . execPath , [
6965- "-e" ,
6966- "const b = Buffer.alloc(1 << 20, 120); (function w() { process.stdout.write(b, w); })();" ,
6967- ] ) ;
6968- const spawner = ChildProcessSpawner . make ( ( command ) =>
6969- Effect . suspend ( ( ) => {
6970- if (
6971- ChildProcess . isStandardCommand ( command ) &&
6972- command . args . includes ( "ls-files" ) &&
6973- command . args . includes ( "--others" )
6974- ) {
6975- listings ++ ;
6976- return delegate . spawn ( flood ) ;
6977- }
6978- return delegate . spawn ( command ) ;
6979- } ) ,
6980- ) ;
6981- const driver = yield * makeGitVcsDriverCore ( ) . pipe (
6982- Effect . provideService ( ChildProcessSpawner . ChildProcessSpawner , spawner ) ,
6983- Effect . provide ( layerServerConfig ) ,
6984- ) ;
6985- const read = driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
6986- assert . strictEqual ( ( yield * read ) . branchChanges , undefined ) ;
6987- yield * read ;
6988- assert . strictEqual ( listings , 1 , "the failed listing is not repeated within the backoff" ) ;
6989- yield * TestClock . adjust ( "1 minute" ) ;
6990- yield * read ;
6991- assert . strictEqual ( listings , 2 ) ;
6992- } ) ,
6993- ) ;
6994-
69956950 it . effect ( "do not list untracked files again on every status read" , ( ) =>
69966951 Effect . gen ( function * ( ) {
69976952 const fs = yield * FileSystem . FileSystem ;
0 commit comments