Repository navigation
find: preserve -regextype across parentheses - #934
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #934 +/- ##
==========================================
+ Coverage 92.79% 92.87% +0.07%
==========================================
Files 37 37
Lines 8038 8039 +1
Branches 403 403
==========================================
+ Hits 7459 7466 +7
+ Misses 437 431 -6
Partials 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Comparing |
|
Commit 95c7980 has test result changes: bfs testsuite: |
1 similar comment
|
Commit 95c7980 has test result changes: bfs testsuite: |
The parser reset the regex syntax on each recursive call, so a setting outside parentheses was ignored inside them and a setting inside was lost after the closing parenthesis. Share the syntax state across recursive calls. Each -regex or -iregex still uses the setting in effect at its position on the command line. Add regression tests for both predicates, including nested groups and settings in short-circuited branches. All 14 cases fail before the fix and pass after it. Fixes uutils#933
zhangpan2001
force-pushed
the
fix/933-regextype-parentheses
branch
from
November 2, 2026 05:46
95c7980 to
f61690d
Compare
1 task done
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.
The parser reset the regex syntax on each recursive call, so a setting outside parentheses was ignored inside them and a setting inside was lost after the closing parenthesis.
Share the syntax state across recursive calls. Each
-regexor-iregexstill uses the setting in effect at its position on the command line.Add regression tests for both predicates, including nested groups and settings in short-circuited branches. All 14 cases fail before the fix and pass after it.
Fixes #933