Skip to content

project search: Skip loading of gitignored paths when their descendants will never match an inclusion/exclusion query#42968

Merged
osiewicz merged 6 commits intomainfrom
project-search-bail-on-gitignored-directories-earlier
Nov 20, 2025
Merged

project search: Skip loading of gitignored paths when their descendants will never match an inclusion/exclusion query#42968
osiewicz merged 6 commits intomainfrom
project-search-bail-on-gitignored-directories-earlier

Conversation

@osiewicz
Copy link
Member

Co-authored-by: dino dinojoaocosta@gmail.com

Related-to: #38799

Release Notes:

  • Improved project search performance with "Also search files ignored by configuration" combined with file inclusion/exclusion queries.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 18, 2025
@osiewicz osiewicz requested a review from smitbarmase November 18, 2025 12:17
will never match an inclusion/exclusion query.

Co-authored-by: dino <dinojoaocosta@gmail.com>
@osiewicz osiewicz force-pushed the project-search-bail-on-gitignored-directories-earlier branch from e271410 to 6915601 Compare November 18, 2025 12:21
@osiewicz osiewicz changed the title project search: Skip loading of gitignored paths when their descendants will never match an inclusion/exclusion query. project search: Skip loading of gitignored paths when their descendants will never match an inclusion/exclusion query Nov 18, 2025
@osiewicz
Copy link
Member Author

Our tests found an issue with a scenario where we have:

  • Enabled ignored dir scans
  • Exclusion pattern is **/*.ts
  • Inclusion pattern is node_modules/prettier/**

Exclusion pattern will prune files before we even get to loading the node_modules.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO these tests could reside in project_search.rs.

@osiewicz osiewicz merged commit 58fe19d into main Nov 20, 2025
36 of 38 checks passed
@osiewicz osiewicz deleted the project-search-bail-on-gitignored-directories-earlier branch November 20, 2025 17:44
mikayla-maki pushed a commit that referenced this pull request Nov 20, 2025
…ts will never match an inclusion/exclusion query (#42968)

Co-authored-by: dino <dinojoaocosta@gmail.com>

Related-to: #38799

Release Notes:

- Improved project search performance with "Also search files ignored by
configuration" combined with file inclusion/exclusion queries.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
…ts will never match an inclusion/exclusion query (zed-industries#42968)

Co-authored-by: dino <dinojoaocosta@gmail.com>

Related-to: zed-industries#38799

Release Notes:

- Improved project search performance with "Also search files ignored by
configuration" combined with file inclusion/exclusion queries.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants