Skip to content

fix: apply --exclude globs under each --search-path root#2000

Open
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:fix/exclude-multi-search-path-1919
Open

fix: apply --exclude globs under each --search-path root#2000
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:fix/exclude-multi-search-path-1919

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 16, 2026

Summary

When multiple --search-path roots are given, --exclude patterns like ghi/def were only evaluated relative to the first root. Matching paths under other roots were not excluded unless the pattern was written as **/ghi/def.

This prefixes relative exclude globs with **/ when more than one search path is configured, so the same pattern applies under every root.

Fixes #1919

Test plan

  • Unit tests for normalize_exclude_pattern_for_multi_root
  • Integration test test_exclude_with_multiple_search_paths
  • Manual repro from the issue
  • cargo test / cargo clippy -- -D warnings

Made with Cursor

leno23 and others added 2 commits May 17, 2026 04:26
Exclude patterns were built relative to the first search path only, so
patterns like `ghi/def` did not exclude matching paths under additional
`--search-path` roots. Prefix relative globs with `**/` when multiple
search paths are used.

Fixes sharkdp#1919

Co-authored-by: Cursor <cursoragent@cursor.com>
The warning test belongs to sharkdp#1650 / sharkdp#1999, not the multi search-path
exclude fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23

This comment was marked as low quality.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

@sharkdp Friendly ping when you have a moment — small fix for multi-root --exclude, CI green on all targets. Thanks!

@tavianator
Copy link
Copy Markdown
Collaborator

@leno23 You just opened all these pull requests, what's with the "friendly ping" comment 13 minutes later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] --exclude quirk, only seems to affect first --search-path in some cases (without glob)

2 participants