Skip to content

Fix [mentions] glob matching to not match partial directories - #2248

Merged
Kobzol merged 3 commits into
rust-lang:masterfrom
Urgau:mentions-glob-fix-cargo
Jan 9, 2026
Merged

Kobzol merged 3 commits into
rust-lang:masterfrom
Urgau:mentions-glob-fix-cargo

Conversation

@Urgau

@Urgau Urgau commented Jan 9, 2026

Copy link
Copy Markdown
Member

This PR fixes our [mentions] glob matching to not match on partial directories.

This is particularly relevant if an entry is src/tools/cargo and the modified paths contains src/tools/cargotest which shouldn't be considered to be matching (as per Path::starts_with rules).

Reported at #triagebot > Mentions glob matching

cc @jieyouxu @tgross35

@Urgau
Urgau requested a review from Kobzol January 9, 2026 18:07

@Kobzol Kobzol left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Kobzol

Kobzol commented Jan 9, 2026

Copy link
Copy Markdown
Member

Maybe a test for a case where someone wanted to actually match both cargo and cargotest (a non-path-like prefix?).

@Urgau

Urgau commented Jan 9, 2026

Copy link
Copy Markdown
Member Author

Sure, done.

@Kobzol
Kobzol added this pull request to the merge queue Jan 9, 2026
Merged via the queue into rust-lang:master with commit 02b25fb Jan 9, 2026
3 checks passed
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.

2 participants