Updating patches.
[rsync-patches.git] / omit-dir-changes.diff
index c6eb808e43580e3f26fd40b086e8beea2b35c903..650c5ebfe1185a824ac063d9298c87521975731e 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                              (optional if already run)
     make
 
-based-on: 3bd9f51917ed5718275c6132006be155239a0550
+based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int delete_mode;
  extern int delete_before;
  extern int delete_during;
-@@ -480,6 +481,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -485,6 +486,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
             const char *xname)
  {
        if (statret >= 0) { /* A from-dest-dir statret can == 1! */
@@ -27,7 +27,7 @@ diff --git a/generator.c b/generator.c
                int keep_time = !preserve_times ? 0
                    : S_ISDIR(file->mode) ? preserve_times & PRESERVE_DIR_TIMES
                    : S_ISLNK(file->mode) ? preserve_times & PRESERVE_LINK_TIMES
-@@ -506,10 +508,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -511,10 +513,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                } else if (preserve_executability
                 && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                        iflags |= ITEM_REPORT_PERMS;
@@ -42,8 +42,8 @@ diff --git a/generator.c b/generator.c
                        iflags |= ITEM_REPORT_GROUP;
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1316,7 +1319,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
-               real_sx = sx;
+@@ -1391,7 +1394,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+               real_ret = statret;
                if (file->flags & FLAG_DIR_CREATED)
                        statret = -1;
 -              if (!preserve_perms) { /* See comment in non-dir code below. */
@@ -54,7 +54,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -59,6 +59,7 @@ int preserve_specials = 0;
+@@ -61,6 +61,7 @@ int preserve_specials = 0;
  int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
@@ -62,7 +62,7 @@ diff --git a/options.c b/options.c
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -701,6 +702,7 @@ void usage(enum logcode F)
+@@ -711,6 +712,7 @@ void usage(enum logcode F)
    rprintf(F," -t, --times                 preserve modification times\n");
    rprintf(F," -O, --omit-dir-times        omit directories from --times\n");
    rprintf(F," -J, --omit-link-times       omit symlinks from --times\n");
@@ -70,7 +70,7 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
  #ifdef SUPPORT_XATTRS
    rprintf(F,"     --fake-super            store/recover privileged attrs using xattrs\n");
-@@ -854,6 +856,7 @@ static struct poptOption long_options[] = {
+@@ -873,6 +875,7 @@ static struct poptOption long_options[] = {
    {"omit-link-times", 'J', POPT_ARG_VAL,    &omit_link_times, 1, 0, 0 },
    {"no-omit-link-times",0, POPT_ARG_VAL,    &omit_link_times, 0, 0, 0 },
    {"no-J",             0,  POPT_ARG_VAL,    &omit_link_times, 0, 0, 0 },
@@ -78,7 +78,7 @@ diff --git a/options.c b/options.c
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
    {"no-super",         0,  POPT_ARG_VAL,    &am_root, 0, 0, 0 },
-@@ -2079,6 +2082,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2157,6 +2160,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
  
@@ -88,15 +88,15 @@ diff --git a/options.c b/options.c
        if (preserve_times) {
                preserve_times = PRESERVE_FILE_TIMES;
                if (!omit_dir_times)
-@@ -2330,6 +2336,8 @@ void server_options(char **args, int *argc_p)
+@@ -2408,6 +2414,8 @@ void server_options(char **args, int *argc_p)
                        argstr[x++] = 'O';
                if (omit_link_times)
                        argstr[x++] = 'J';
 +              if (omit_dir_changes == 1)
 +                      args[ac++] = "--omit-dir-changes";
-       } else {
-               if (copy_links)
-                       argstr[x++] = 'L';
+               if (fuzzy_basis) {
+                       argstr[x++] = 'y';
+                       if (fuzzy_basis > 1)
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
@@ -107,10 +107,10 @@ diff --git a/rsync.c b/rsync.c
 +extern int omit_dir_changes;
  extern int am_root;
  extern int am_server;
- extern int am_sender;
-@@ -505,9 +506,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
-                       file->flags |= FLAG_TIME_FAILED;
-       }
+ extern int am_daemon;
+@@ -489,9 +490,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+               get_acl(fname, sxp);
+ #endif
  
 -      change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
 +      change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file)
@@ -125,7 +125,7 @@ diff --git a/rsync.c b/rsync.c
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -357,6 +357,7 @@ to the detailed description below for a complete description.  verb(
+@@ -374,6 +374,7 @@ to the detailed description below for a complete description.  verb(
   -t, --times                 preserve modification times
   -O, --omit-dir-times        omit directories from --times
   -J, --omit-link-times       omit symlinks from --times
@@ -133,7 +133,7 @@ diff --git a/rsync.yo b/rsync.yo
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -1132,6 +1133,10 @@ This option is inferred if you use bf(--backup) without bf(--backup-dir).
+@@ -1197,6 +1198,10 @@ directories.
  dit(bf(-J, --omit-link-times)) This tells rsync to omit symlinks when
  it is preserving modification times (see bf(--times)).