Repository navigation
Preserve custom patterns during automatic backend selection - #162
Open
harbinresearcher wants to merge 1 commit into
Open
harbinresearcher wants to merge 1 commit into
harbinresearcher wants to merge 1 commit into
Conversation
Select the simple PathSpec backend for non-RegexPattern inputs so optional native engines do not break the public Pattern interface. Cover construction, factories, mixed matching and addition. Fixes cpburnz#161.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #161.
PathSpecaccepts customPatternimplementations, but installing RE2 or Hyperscan causes the default backend to reject them. Select the existing simple backend when automatic selection encounters a non-RegexPattern. Explicit native selection,GitIgnoreSpec, and ordinary regex patterns retain their existing behavior.Four regression methods exercise custom construction, callable factories, mixed include/exclude patterns and indices, negation, and
+/+=. Constructor documentation describes the fallback.Validation
git diff --checkpassed. Mypy and Pyright retain exactly the same diagnostics as pristine master: 2 and 6 errors respectively. Type checking is not claimed as passing.AI-assisted investigation, implementation, tests and read-only review with OpenAI Codex (GPT-6). No human maintainer review is claimed.
Remote CI: Test Cross run 38234033566 requires maintainer approval (
action_required). No remote test pass is claimed.