summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-08-13 18:19:16 -0500
committerJim Meyering <meyering@redhat.com>2010-08-13 18:58:39 -0500
commit9c45c193825d1f59e1d341e556ecf4adeb7a03a2 (patch)
tree45f3d1f2946c96503c5087e36706170ea9684b47 /src
parent3569576a3304b51491be0a88d4659713d960674f (diff)
downloadgrep-9c45c193825d1f59e1d341e556ecf4adeb7a03a2.tar.gz
make --include=FILE work once again
The semantics of excluded_file_name changed (when operating on an "included" file name list). * src/main.c (main): Adjust for changed semantics of excluded_file_name simply by removing a negation. * NEWS (Bug fixes): Mention this fix. * tests/include-exclude: Add a test for this. Reported by Joe Perches in http://savannah.gnu.org/bugs/?29876.
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 20168bb4..6c4fcd6c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2172,11 +2172,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 (STREQ (file, "-") ? (char *) NULL : file,