From 5275029d11b980f7a5c6582c78412ae864dd2ec8 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 14 Mar 2007 00:00:01 +0000 Subject: [PATCH 1/1] Added an explicit option that will disallow the use of incremental recursive mode (and an option to negate that). --- compat.c | 6 ++++-- options.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compat.c b/compat.c index 66438c4f..a71e45e4 100644 --- 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 allow_inc_recurse; 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) { - 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; } diff --git a/options.c b/options.c index 83f80c4a..4bf20c0b 100644 --- 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 allow_inc_recurse = 1; 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 }, + {"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 }, -- 2.34.1