Skip to content

Commit 3d5aff5

Browse files
committed
fix(git): rename MAX_UNTRACKED_LINE_COUNT to MAX_UNTRACKED_FILES
1 parent 33387b2 commit 3d5aff5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/git/src/queries.ts

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

0 commit comments

Comments
 (0)