Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that --delete-excluded does not elide a per-dir merge
[rsync/rsync.git]
/
exclude.c
diff --git
a/exclude.c
b/exclude.c
index
eb2353c
..
dc1a475
100644
(file)
--- a/
exclude.c
+++ b/
exclude.c
@@
-298,7
+298,7
@@
static char *parse_merge_name(const char *merge_file, unsigned int *len_ptr,
strlcpy(to, merge_file, *len_ptr + 1);
merge_file = to;
}
strlcpy(to, merge_file, *len_ptr + 1);
merge_file = to;
}
- if (!sanitize_path(fn, merge_file, r, dirbuf_depth)) {
+ if (!sanitize_path(fn, merge_file, r, dirbuf_depth
, NULL
)) {
rprintf(FERROR, "merge-file name overflows: %s\n",
merge_file);
return NULL;
rprintf(FERROR, "merge-file name overflows: %s\n",
merge_file);
return NULL;
@@
-500,6
+500,8
@@
static int rule_matches(char *name, struct filter_struct *ex, int name_is_dir)
char *p, *pattern = ex->pattern;
const char *strings[16]; /* more than enough */
char *p, *pattern = ex->pattern;
const char *strings[16]; /* more than enough */
+ if (*name == '/')
+ name++;
if (!*name)
return 0;
if (!*name)
return 0;
@@
-531,8
+533,6
@@
static int rule_matches(char *name, struct filter_struct *ex, int name_is_dir)
if (*pattern == '/') {
anchored_match = 1;
pattern++;
if (*pattern == '/') {
anchored_match = 1;
pattern++;
- if (strings[0][0] == '/')
- strings[0]++;
}
if (!anchored_match && ex->u.slash_cnt
}
if (!anchored_match && ex->u.slash_cnt
@@
-861,7
+861,7
@@
static char default_cvsignore[] =
" *.a *.olb *.o *.obj *.so *.exe"
" *.Z *.elc *.ln core"
/* The rest we added to suit ourself. */
" *.a *.olb *.o *.obj *.so *.exe"
" *.Z *.elc *.ln core"
/* The rest we added to suit ourself. */
- " .svn/";
+ " .svn/
.bzr/
";
static void get_cvs_excludes(uint32 mflags)
{
static void get_cvs_excludes(uint32 mflags)
{
@@
-1102,7
+1102,8
@@
static void send_rules(int f_out, struct filter_list_struct *flp)
elide = am_sender ? 1 : -1;
if (ent->match_flags & MATCHFLG_RECEIVER_SIDE)
elide = elide ? 0 : am_sender ? -1 : 1;
elide = am_sender ? 1 : -1;
if (ent->match_flags & MATCHFLG_RECEIVER_SIDE)
elide = elide ? 0 : am_sender ? -1 : 1;
- else if (delete_excluded && !elide)
+ else if (delete_excluded && !elide
+ && (!(ent->match_flags & MATCHFLG_PERDIR_MERGE) || ent->match_flags & MATCHFLG_CVS_IGNORE))
elide = am_sender ? 1 : -1;
if (elide < 0) {
if (prev)
elide = am_sender ? 1 : -1;
if (elide < 0) {
if (prev)