Skip to content

Commit 8314c15

Browse files
committed
Add clarifying comments for ig parameter
The ig (ignore instance) is loaded once from .gitignore and passed through recursion for efficiency. This avoids re-parsing .gitignore at every directory level.
1 parent 8de0ffc commit 8314c15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/tools/file_list.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ interface TraversalOptions {
1717
pattern?: string;
1818
useGitignore: boolean;
1919
maxEntries: number;
20-
ig: ReturnType<typeof ignore> | null;
21-
rootPath: string;
20+
ig: ReturnType<typeof ignore> | null; // Ignore instance loaded once from .gitignore, reused across recursion
21+
rootPath: string; // Root path for calculating relative paths in gitignore matching
2222
}
2323

2424
interface TraversalResult {

0 commit comments

Comments
 (0)