exclude: fix the case of globs vs. EXCLUDE_INCLUDE
authorJavier Villavicencio <the_paya@gentoo.org>
Sun, 28 Mar 2010 18:42:01 +0000 (20:42 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 28 Mar 2010 18:50:42 +0000 (20:50 +0200)
* lib/exclude.c (excluded_file_pattern_p): Fix logic error that
made it so grep -r --include=GLOB* ... did not work.

ChangeLog
lib/exclude.c

index 12e0722..86403b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-28  Javier Villavicencio  <the_paya@gentoo.org>
+
+       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  <meyering@redhat.com>
            Eric Blake  <eblake@redhat.com>
 
index d4dcd76..34b5636 100644 (file)
@@ -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;