Skip to content

Commit ec50cb8

Browse files
committed
fix(git): rename MAX_UNTRACKED_LINE_COUNT to MAX_UNTRACKED_FILES
1 parent 364af8b commit ec50cb8

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

packages/git/src/queries.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)