[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] exclude: fix the case of globs vs. EXCLUDE_INCLUDE
From: |
Jim Meyering |
Subject: |
[PATCH] exclude: fix the case of globs vs. EXCLUDE_INCLUDE |
Date: |
Sun, 28 Mar 2010 20:44:50 +0200 |
I expect to push this tiny patch by Javier (Cc'd).
Thanks, Javier!
Without it, grep's --include=GLOB doesn't work.
>From efd2b17d1431399233caa5e5b55c831a3459f66a Mon Sep 17 00:00:00 2001
From: Javier Villavicencio <address@hidden>
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 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12e0722..86403b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-28 Javier Villavicencio <address@hidden>
+
+ 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 <address@hidden>
Eric Blake <address@hidden>
diff --git a/lib/exclude.c b/lib/exclude.c
index d4dcd76..34b5636 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;
--
1.7.0.3.448.g82eeb
- [PATCH] exclude: fix the case of globs vs. EXCLUDE_INCLUDE,
Jim Meyering <=