diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-05-06 15:50:58 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-05-06 15:52:21 -0700 |
commit | 58195fabc7559541b3736400e08e901011acd61f (patch) | |
tree | e970657b01977d56bbad428f4e5f18276b1f9d3c /cfg.mk | |
parent | c1ac4ab87042fd0d18d6bda9db75677c7913341f (diff) | |
download | grep-58195fabc7559541b3736400e08e901011acd61f.tar.gz |
exclude: process exclude and include directives in order
Also, change exclude and include directives so that they apply to
command-line arguments too. This restores the pre-2.6 behavior,
and fixes a bug reported by Quentin Arce in
<http://lists.gnu.org/archive/html/bug-grep/2012-04/msg00056.html>.
* NEWS: Document this.
* src/main.c (included_patterns): Remove. All uses removed.
(skipped_file): New function.
(grepdirent): New arg command_line; all callers changed. This is
needed because non-command-line files can invoke fts_open, and
their directory entries need to be distinguished from top-level
directory entries. Move code into the new skipped_file function.
(grepdesc): Check whether a command-line argument should be skipped.
(main): --include and --exclude options now share excluded_patterns
rather than having separate variables included_patterns and
excluded_patterns.
* tests/include-exclude: Add a test to detect the fixed bug.
Diffstat (limited to 'cfg.mk')
0 files changed, 0 insertions, 0 deletions