From 6207255863f1fb5172ead8b03cda5e4b0b7336a4 Mon Sep 17 00:00:00 2001 From: Javier Villavicencio Date: Sun, 28 Mar 2010 20:42:01 +0200 Subject: [PATCH] exclude: fix the case of globs vs. EXCLUDE_INCLUDE * lib/exclude.c (excluded_file_pattern_p): Fix logic error that made it so grep -r --include=GLOB* ... did not work. --- ChangeLog | 6 ++++++ lib/exclude.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 12e072206a..86403b2add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-28 Javier Villavicencio + + exclude: fix the case of globs vs. EXCLUDE_INCLUDE + * lib/exclude.c (excluded_file_pattern_p): Fix logic error that + made it so grep -r --include=GLOB* ... did not work. + 2010-03-26 Jim Meyering Eric Blake diff --git a/lib/exclude.c b/lib/exclude.c index d4dcd76bd9..34b5636711 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -342,7 +342,7 @@ excluded_file_pattern_p (struct exclude_segment const *seg, char const *f) { char const *pattern = exclude[i].pattern; int options = exclude[i].options; - if (excluded != exclude_fnmatch (pattern, f, options)) + if (exclude_fnmatch (pattern, f, options)) return !excluded; } return excluded; -- 2.30.2