diff options
author | Jim Meyering <meyering@redhat.com> | 2010-08-13 18:19:16 -0500 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-08-13 18:58:39 -0500 |
commit | 9c45c193825d1f59e1d341e556ecf4adeb7a03a2 (patch) | |
tree | 45f3d1f2946c96503c5087e36706170ea9684b47 /src | |
parent | 3569576a3304b51491be0a88d4659713d960674f (diff) | |
download | grep-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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, |