X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/7f0bf1cb30e4c9cb751903ae1e7b235760bcfd00..5214a41bbae94607b196b199b483710e1babf292:/cvs-entries.diff diff --git a/cvs-entries.diff b/cvs-entries.diff index d566a48..851f89b 100644 --- a/cvs-entries.diff +++ b/cvs-entries.diff @@ -8,19 +8,20 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make +based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d diff --git a/exclude.c b/exclude.c --- a/exclude.c +++ b/exclude.c -@@ -239,6 +239,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 = NULL; + 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; -@@ -470,6 +472,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) set_filter_dir(dir, dirlen); } @@ -34,16 +35,16 @@ diff --git a/exclude.c b/exclude.c + } if (strlcpy(dirbuf + dirbuf_len, ex->pattern, MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) { - parse_filter_file(lp, dirbuf, ex->match_flags, -@@ -1030,6 +1040,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_ char line[BIGPATHBUFLEN]; char *eob = line + sizeof line - 1; - int word_split = mflags & MATCHFLG_WORD_SPLIT; + BOOL word_split = (template->rflags & FILTRULE_WORD_SPLIT) != 0; + int slash_parse = xflags & XFLG_CVS_ENTRIES ? 1 : 0; if (!fname || !*fname) return; -@@ -1076,6 +1087,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_ } break; } @@ -68,7 +69,7 @@ diff --git a/exclude.c b/exclude.c if (word_split && isspace(ch)) break; if (eol_nulls? !ch : (ch == '\n' || ch == '\r')) -@@ -1085,13 +1114,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_ else overflow = 1; } @@ -80,15 +81,14 @@ diff --git a/exclude.c b/exclude.c *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); if (ch == EOF) break; diff --git a/rsync.h b/rsync.h --- a/rsync.h +++ b/rsync.h -@@ -148,6 +148,7 @@ +@@ -157,6 +157,7 @@ #define XFLG_ANCHORED2ABS (1<<2) /* leading slash indicates absolute */ #define XFLG_ABS_IF_SLASH (1<<3) /* leading or interior slash is absolute */ #define XFLG_DIR2WILD3 (1<<4) /* dir/ match gets trailing *** added */