Commit Graph

15 Commits

Author SHA1 Message Date
Gaurav
4b91a3cb39 fix: gitignore handling (#8177) 2025-09-10 19:48:07 +00:00
Billy Biggs
833a8949a7 Limit recursion when looking for .gitignore files (#8103)
Co-authored-by: cornmander <shikhman@google.com>
2025-09-09 21:45:37 +00:00
Gaurav
1ca388019f feat: handle nested gitignore files (#7645)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-03 14:23:27 +00:00
fuyou
1f473dbcd5 fix(gitIgnore): prevent crash/error when processing malformed file paths in GitIgnoreParser (#7553)
Co-authored-by: Srinath Padmanabhan <17151014+srithreepo@users.noreply.github.com>
2025-09-03 06:19:20 +00:00
Pascal Birchler
42392f6308 chore: consistently import node modules with prefix (#3013)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-08-25 20:11:27 +00:00
Tommaso Sciortino
71c3938ecc Upgrade test to work on windows. (#4815) 2025-07-25 07:15:41 +00:00
osbornesec
79d20b35dd fix: prevent RangeError in GitIgnoreParser for root paths (#3417)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-07-20 07:12:53 +00:00
N. Taylor Mullen
53dcaf56c7 Remove .gitignore logging from startup. (#1323) 2025-06-23 11:12:42 -07:00
Allen Hutchison
aa967d7a49 Fix noise in headless mode on STDOUT (#1184) 2025-06-18 11:40:15 -07:00
Anas H. Sulaiman
194e091d4a centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
Anas H. Sulaiman
5a5ec49341 initialize FileDiscoveryService once (#1029) 2025-06-13 17:25:59 -07:00
Anas H. Sulaiman
84c7332308 reuse GitIgnoreParser for loading .geminiignore (#1025) 2025-06-13 17:17:08 -04:00
DeWitt Clinton
abf623a1a9 Improve the performance of filename completion over large repositories. (#938) 2025-06-12 07:09:38 -07:00
N. Taylor Mullen
275c295dc3 feat(git): Refactor gitignore handling to use ignore library instead of minimatch (#864) 2025-06-08 18:32:19 -07:00
Keith Ballinger
906f716d3e Ignore folders files (#651)
# Add .gitignore-Aware File Filtering to gemini-cli

This pull request introduces .gitignore-based file filtering to the gemini-cli, ensuring that git-ignored files are automatically excluded from file-related operations and suggestions throughout the CLI. The update enhances usability, reduces noise from build artifacts and dependencies, and provides new configuration options for fine-tuning file discovery.

Key Improvements
.gitignore File Filtering

All @ (at) commands, file completions, and core discovery tools now honor .gitignore patterns by default.
Git-ignored files (such as node_modules/, dist/, .env, and .git) are excluded from results unless explicitly overridden.
The behavior can be customized via a new fileFiltering section in settings.json, including options for:
Turning .gitignore respect on/off.
Adding custom ignore patterns.
Allowing or excluding build artifacts.
Configuration & Documentation Updates

settings.json schema extended with fileFiltering options.
Documentation updated to explain new filtering controls and usage patterns.
Testing

New and updated integration/unit tests for file filtering logic, configuration merging, and edge cases.
Test coverage ensures .gitignore filtering works as intended across different workflows.
Internal Refactoring

Core file discovery logic refactored for maintainability and extensibility.
Underlying tools (ls, glob, read-many-files) now support git-aware filtering out of the box.


Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-04 04:40:46 +00:00