X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/41961db0bd8e54d3f62c7e706125e01be357a261..0a39837a62e4b623cc575f5b284b4c532c84e84f:/batch.c diff --git a/batch.c b/batch.c index 28f9a509..44d2c98f 100644 --- a/batch.c +++ b/batch.c @@ -8,7 +8,6 @@ #include "rsync.h" #include -extern int itemize_changes; extern int am_sender; extern int eol_nulls; extern int recurse; @@ -24,17 +23,14 @@ extern char *batch_name; extern struct filter_list_struct filter_list; -static int fudged_recurse; - static int *flag_ptr[] = { - &fudged_recurse, + &recurse, &preserve_uid, &preserve_gid, &preserve_links, &preserve_devices, &preserve_hard_links, &always_checksum, - &itemize_changes, NULL }; @@ -47,7 +43,6 @@ static char *flag_name[] = { "--hard-links (-H)", "--checksum (-c)", "--dirs (-d)", - "--itemize-changes (-i)", NULL }; @@ -57,7 +52,6 @@ void write_stream_flags(int fd) /* Start the batch file with a bitmap of data-stream-affecting * flags. */ - fudged_recurse = recurse < 0; for (i = 0, flags = 0; flag_ptr[i]; i++) { if (*flag_ptr[i]) flags |= 1 << i; @@ -69,7 +63,6 @@ void read_stream_flags(int fd) { int i, flags; - fudged_recurse = recurse < 0; if (protocol_version < 29) xfer_dirs = 0; for (i = 0, flags = read_int(fd); flag_ptr[i]; i++) { @@ -83,7 +76,6 @@ void read_stream_flags(int fd) *flag_ptr[i] = set; } } - recurse = fudged_recurse ? -1 : 0; if (protocol_version < 29) xfer_dirs = recurse ? 1 : 0; } @@ -182,10 +174,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) } else write_arg(fd, p); } - if ((p = find_colon(argv[argc - 1])) != NULL) { - if (*++p == ':') - p++; - } else + if (!(p = check_for_hostspec(argv[argc - 1], &p, &i))) p = argv[argc - 1]; write(fd, " ${1:-", 6); write_arg(fd, p);