Skip to content

Apply exclude patterns when shoveling into FileList#754

Open
hsbt wants to merge 1 commit into
masterfrom
claude/serene-elgamal-01ae43
Open

Apply exclude patterns when shoveling into FileList#754
hsbt wants to merge 1 commit into
masterfrom
claude/serene-elgamal-01ae43

Conversation

@hsbt

@hsbt hsbt commented Jul 17, 2026

Copy link
Copy Markdown
Member

FileList#<< pushed the appended entry after resolve and never passed it through excluded_from_list?. A name added after #exclude, or one matching a default ignore pattern such as core or *.bak, stayed in the list even though #include dropped it. The two ways of adding a file disagreed on exclusion.

This filters the appended name through the same excluded_from_list? check that #include and add_matching already rely on, so #<< gains the exclusion semantics of #include. Default ignore patterns now apply to shoveled entries as well, which is a small behavior change worth noting for anyone that relied on #<< bypassing exclusion.

fl = Rake::FileList.new
fl.exclude("abc.c")
fl << "abc.c"
fl.to_a # => [] (previously ["abc.c"])

#637

FileList#<< pushed the new entry after resolve and never ran it
through excluded_from_list?, so a name added after #exclude (or one
matching a default ignore pattern such as core or *.bak) leaked into
the list while #include correctly dropped it. Filter the appended
name so #<< shares the same exclusion semantics as #include, which
also means default ignore patterns now apply to shoveled entries.

#637

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 03:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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