File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -468,20 +468,18 @@ export async function getChangedFilesDetailed(
468468 if ( hasFrom ) seenPaths . add ( file . from as string ) ;
469469 }
470470
471- const MAX_UNTRACKED_LINE_COUNT = 10_000 ;
471+ const MAX_UNTRACKED_FILES = 10_000 ;
472472 let untrackedProcessed = 0 ;
473473 for ( const file of status . not_added ) {
474+ if ( untrackedProcessed >= MAX_UNTRACKED_FILES ) break ;
474475 if ( ! seenPaths . has ( file ) ) {
475476 if (
476477 excludePatterns &&
477478 matchesExcludePattern ( file , excludePatterns )
478479 ) {
479480 continue ;
480481 }
481- const lineCount =
482- untrackedProcessed < MAX_UNTRACKED_LINE_COUNT
483- ? await countFileLines ( path . join ( baseDir , file ) )
484- : 0 ;
482+ const lineCount = await countFileLines ( path . join ( baseDir , file ) ) ;
485483 files . push ( {
486484 path : file ,
487485 status : "untracked" ,
You can’t perform that action at this time.
0 commit comments