Added an explicit option that will disallow the use of
authorWayne Davison <wayned@samba.org>
Wed, 14 Mar 2007 00:00:01 +0000 (00:00 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 14 Mar 2007 00:00:01 +0000 (00:00 +0000)
incremental recursive mode (and an option to negate that).

compat.c
options.c

index 66438c4..a71e45e 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -31,6 +31,7 @@ extern int am_sender;
 extern int local_server;
 extern int inplace;
 extern int recurse;
 extern int local_server;
 extern int inplace;
 extern int recurse;
+extern int allow_inc_recurse;
 extern int fuzzy_basis;
 extern int read_batch;
 extern int max_delete;
 extern int fuzzy_basis;
 extern int read_batch;
 extern int max_delete;
@@ -160,8 +161,9 @@ void setup_protocol(int f_out,int f_in)
                        exit_cleanup(RERR_PROTOCOL);
                }
        } else if (protocol_version >= 30) {
                        exit_cleanup(RERR_PROTOCOL);
                }
        } else if (protocol_version >= 30) {
-               if (recurse && !preserve_hard_links && !delete_before
-                && !delete_after && !delay_updates && !prune_empty_dirs)
+               if (recurse && allow_inc_recurse && !preserve_hard_links
+                && !delete_before && !delete_after && !delay_updates
+                && !prune_empty_dirs)
                        inc_recurse = 1;
                need_messages_from_generator = 1;
        }
                        inc_recurse = 1;
                need_messages_from_generator = 1;
        }
index 83f80c4..4bf20c0 100644 (file)
--- a/options.c
+++ b/options.c
@@ -90,6 +90,7 @@ char *filesfrom_host = NULL;
 int eol_nulls = 0;
 int human_readable = 0;
 int recurse = 0;
 int eol_nulls = 0;
 int human_readable = 0;
 int recurse = 0;
+int allow_inc_recurse = 1;
 int xfer_dirs = -1;
 int am_daemon = 0;
 int daemon_over_rsh = 0;
 int xfer_dirs = -1;
 int am_daemon = 0;
 int daemon_over_rsh = 0;
@@ -422,6 +423,10 @@ static struct poptOption long_options[] = {
   {"archive",         'a', POPT_ARG_NONE,   0, 'a', 0, 0 },
   {"recursive",       'r', POPT_ARG_VAL,    &recurse, 2, 0, 0 },
   {"no-recursive",     0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },
   {"archive",         'a', POPT_ARG_NONE,   0, 'a', 0, 0 },
   {"recursive",       'r', POPT_ARG_VAL,    &recurse, 2, 0, 0 },
   {"no-recursive",     0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },
+  {"ir",               0,  POPT_ARG_VAL,    &allow_inc_recurse, 1, 0, 0 },
+  {"inc-recursive",    0,  POPT_ARG_VAL,    &allow_inc_recurse, 1, 0, 0 },
+  {"no-ir",            0,  POPT_ARG_VAL,    &allow_inc_recurse, 0, 0, 0 },
+  {"no-inc-recursive", 0,  POPT_ARG_VAL,    &allow_inc_recurse, 0, 0, 0 },
   {"no-r",             0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },
   {"dirs",            'd', POPT_ARG_VAL,    &xfer_dirs, 2, 0, 0 },
   {"no-dirs",          0,  POPT_ARG_VAL,    &xfer_dirs, 0, 0, 0 },
   {"no-r",             0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },
   {"dirs",            'd', POPT_ARG_VAL,    &xfer_dirs, 2, 0, 0 },
   {"no-dirs",          0,  POPT_ARG_VAL,    &xfer_dirs, 0, 0, 0 },