File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -441,20 +441,18 @@ export async function getChangedFilesDetailed(
441441 if ( hasFrom ) seenPaths . add ( file . from as string ) ;
442442 }
443443
444- const MAX_UNTRACKED_LINE_COUNT = 10_000 ;
444+ const MAX_UNTRACKED_FILES = 10_000 ;
445445 let untrackedProcessed = 0 ;
446446 for ( const file of status . not_added ) {
447+ if ( untrackedProcessed >= MAX_UNTRACKED_FILES ) break ;
447448 if ( ! seenPaths . has ( file ) ) {
448449 if (
449450 excludePatterns &&
450451 matchesExcludePattern ( file , excludePatterns )
451452 ) {
452453 continue ;
453454 }
454- const lineCount =
455- untrackedProcessed < MAX_UNTRACKED_LINE_COUNT
456- ? await countFileLines ( path . join ( baseDir , file ) )
457- : 0 ;
455+ const lineCount = await countFileLines ( path . join ( baseDir , file ) ) ;
458456 files . push ( {
459457 path : file ,
460458 status : "untracked" ,
You can’t perform that action at this time.
0 commit comments