Changes needed to use check_for_hostspec() in place of find_colon().
[rsync/rsync.git] / batch.c
diff --git a/batch.c b/batch.c
index 28f9a50..88dad3c 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -8,7 +8,6 @@
 #include "rsync.h"
 #include <time.h>
 
-extern int itemize_changes;
 extern int am_sender;
 extern int eol_nulls;
 extern int recurse;
@@ -34,7 +33,6 @@ static int *flag_ptr[] = {
        &preserve_devices,
        &preserve_hard_links,
        &always_checksum,
-       &itemize_changes,
        NULL
 };
 
@@ -47,7 +45,6 @@ static char *flag_name[] = {
        "--hard-links (-H)",
        "--checksum (-c)",
        "--dirs (-d)",
-       "--itemize-changes (-i)",
        NULL
 };
 
@@ -182,10 +179,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);