From 254ee3baab09a1dbaa4b54efe402a26b4e2ba72a Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 24 Mar 2005 16:41:16 +0000 Subject: [PATCH] - Don't complain if --dry-run is specified with --read-batch or --write-batch. - If --write-batch is combined with --dry-run, just disable --write-batch (that avoids trying to create a batch file and tells the user what would be transferred). --- options.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/options.c b/options.c index b6500579..301178d4 100644 --- a/options.c +++ b/options.c @@ -901,12 +901,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain) return 0; } if (write_batch || read_batch) { - if (dry_run) { - snprintf(err_buf, sizeof err_buf, - "--%s-batch cannot be used with --dry_run (-n)\n", - write_batch ? "write" : "read"); - return 0; - } if (am_server) { rprintf(FINFO, "ignoring --%s-batch option sent to server\n", @@ -916,7 +910,8 @@ int parse_arguments(int *argc, const char ***argv, int frommain) * batch args to server. */ read_batch = write_batch = 0; batch_name = NULL; - } + } else if (dry_run) + write_batch = 0; } if (read_batch && files_from) { snprintf(err_buf, sizeof err_buf, -- 2.34.1