Skip to content

Document pattern sequence ownership - #186

Closed
ada-wh525 wants to merge 1 commit into
cpburnz:masterfrom
ada-wh525:ada-wh525/document-pattern-ownership
Closed

ada-wh525 wants to merge 1 commit into
cpburnz:masterfrom
ada-wh525:ada-wh525/document-pattern-ownership

Conversation

@ada-wh525

Copy link
Copy Markdown

Changing a pattern list after passing it to PathSpec or GitIgnoreSpec
can change what spec.patterns shows without changing the matching results.

Document that sequences are stored as supplied and should be left unchanged
after construction, while other iterables are consumed into a new list.
Recommend creating a new spec when the pattern collection needs to change.

Validation: the strict Sphinx HTML build and git diff --check passed.

Ref to #185.

@cpburnz

cpburnz commented Dec 3, 2026

Copy link
Copy Markdown
Owner

I went with less verbose descriptions.

@cpburnz cpburnz closed this Dec 3, 2026
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