- 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).
This commit is contained in:
Wayne Davison
2005-03-24 16:41:16 +00:00
parent f957e8fdf9
commit 254ee3baab

View File

@@ -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,