Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wenbowang
grep
grep-2.6.3-include-fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File grep-2.6.3-include-fix.patch of Package grep
diff --git a/src/main.c b/src/main.c index cea245c..20461c1 100644 --- a/src/main.c +++ b/src/main.c @@ -2177,11 +2177,11 @@ There is NO WARRANTY, to the extent permitted by law.\n"), if ((included_patterns || excluded_patterns) && !isdir (file)) { - if (included_patterns && - ! excluded_file_name (included_patterns, file)) + if (included_patterns + && excluded_file_name (included_patterns, file)) continue; - if (excluded_patterns && - excluded_file_name (excluded_patterns, file)) + if (excluded_patterns + && excluded_file_name (excluded_patterns, file)) continue; } status &= grepfile (strcmp (file, "-") == 0 ? (char *) NULL : file, diff --git a/tests/include-exclude b/tests/include-exclude index 0745ce5..2fa3b24 100644 --- a/tests/include-exclude +++ b/tests/include-exclude @@ -40,4 +40,8 @@ grep -r --include='a*' . x > out || fail=1 # no need to sort compare out exp-a || fail=1 +# --include (without --recursive) uses different code +grep --include=a a x/* > out || fail=1 +compare out exp-a || fail=1 + Exit $fail
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor