-@@ -275,6 +275,8 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
- if (!(lp = new_array(struct filter_list_struct, 1)))
+@@ -267,6 +267,8 @@ static void add_rule(filter_rule_list *listp, const char *pat, unsigned int pat_
+ if (!(lp = new_array(filter_rule_list, 1)))
out_of_memory("add_rule");
lp->head = lp->tail = lp->parent_dirscan_head = NULL;
+ if (mflags & MATCHFLG_CVS_IGNORE)
+ cp = "CVS";
if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0)
out_of_memory("add_rule");
out_of_memory("add_rule");
lp->head = lp->tail = lp->parent_dirscan_head = NULL;
+ if (mflags & MATCHFLG_CVS_IGNORE)
+ cp = "CVS";
if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0)
out_of_memory("add_rule");
- ret->u.mergelist = lp;
-@@ -536,6 +538,14 @@ void *push_local_filters(const char *dir, unsigned int dirlen)
+ rule->u.mergelist = lp;
+@@ -526,6 +528,14 @@ void *push_local_filters(const char *dir, unsigned int dirlen)
+ }
if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
+ }
if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
- parse_filter_file(lp, dirbuf, ex->match_flags,
-@@ -1122,6 +1132,7 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname,
+ parse_filter_file(lp, dirbuf, ex,
+@@ -1151,6 +1161,7 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
-@@ -1168,6 +1179,24 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname,
+@@ -1197,6 +1208,24 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
-@@ -1177,13 +1206,15 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname,
+@@ -1206,13 +1235,14 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
*s = '\0';
/* Skip an empty token and (when line parsing) comments. */
- if (*line && (word_split || (*line != ';' && *line != '#')))
*s = '\0';
/* Skip an empty token and (when line parsing) comments. */
- if (*line && (word_split || (*line != ';' && *line != '#')))
-+ if (*line && (word_split || slash_parse
-+ || (*line != ';' && *line != '#')))
- parse_rule(listp, line, mflags, xflags);
++ if (*line && (word_split || slash_parse || (*line != ';' && *line != '#')))
+ parse_filter_str(listp, line, template, xflags);
#define ATTRS_REPORT (1<<0)
#define ATTRS_SKIP_MTIME (1<<1)
diff --git a/testsuite/exclude.test b/testsuite/exclude.test
#define ATTRS_REPORT (1<<0)
#define ATTRS_SKIP_MTIME (1<<1)
diff --git a/testsuite/exclude.test b/testsuite/exclude.test
--- a/testsuite/exclude.test
+++ b/testsuite/exclude.test
@@ -19,6 +19,7 @@ export CVSIGNORE
--- a/testsuite/exclude.test
+++ b/testsuite/exclude.test
@@ -19,6 +19,7 @@ export CVSIGNORE