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 12e072206a065b8280218c56f76283a8bbbec332..86403b2adde352cdd33e09b3c189e3457343126b 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 d4dcd76bd9f193e1494be31ab73d0ade35b53949..34b563671116c24585e538acf0c7255a59eb8368 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;