Repository navigation
grep: list every file with -L when no line can be selected - #216
yunusarda-sudo wants to merge 1 commit into
Conversation
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
=======================================
Coverage 97.22% 97.22%
=======================================
Files 6 6
Lines 2270 2272 +2
Branches 245 248 +3
=======================================
+ Hits 2207 2209 +2
Misses 63 63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
01e5644 to
157f1b8
Compare
|
GNU grep testsuite comparison: |
157f1b8 to
b4f9a37
Compare
|
GNU grep testsuite comparison: |
390a0b9 to
0d7707b
Compare
|
GNU grep testsuite comparison: |
0d7707b to
6be5d02
Compare
|
GNU grep testsuite comparison: |
With -m 0, or -v and an empty pattern, grep exits before opening any file. -L has to list each file in that case, so keep searching.
6be5d02 to
0a19c4b
Compare
|
GNU grep testsuite comparison: |
With
-m 0, or-vwith an empty pattern, no line can be selected, so grep exits with status 1 before opening any file. That is right for normal output,-c,-land-q, but with-Levery file has no selected line and GNU grep lists each of them (and still reports the ones it can't open).uu_grepprinted nothing.The early exit is now skipped for
-L, so the normal search runs and lists the files. Added a test for both cases and for a missing file.The GNU
skip-readtest still fails after this, on the empty pattern file case (#204, covered by #215).Closes #213