If -w and -v are both on, don't output the "log the transfer"
authorWayne Davison <wayned@samba.org>
Tue, 15 Feb 2005 07:20:04 +0000 (07:20 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 15 Feb 2005 07:20:04 +0000 (07:20 +0000)
verbose message.

receiver.c
sender.c

index f91f4a1bc6f68c7faf1c03070bb4c137fa67deb4..92a2cf3171fa9a2988202870cfc46ab10932349e 100644 (file)
@@ -21,6 +21,7 @@
 #include "rsync.h"
 
 extern int verbose;
+extern int what_has_changed;
 extern int delete_after;
 extern int csum_length;
 extern struct stats stats;
@@ -387,8 +388,8 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
                if (verbose > 2)
                        rprintf(FINFO, "recv_files(%s)\n", safe_fname(fname));
 
-               if (dry_run) {
-                       if (!am_server && verbose) /* log the transfer */
+               if (dry_run) { /* log the transfer */
+                       if (!am_server && verbose && !what_has_changed)
                                rprintf(FINFO, "%s\n", safe_fname(fname));
                        continue;
                }
@@ -531,7 +532,8 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
                                cleanup_set(fnametmp, partialptr, file, fd1, fd2);
                }
 
-               if (!am_server && verbose) /* log the transfer */
+               /* log the transfer */
+               if (!am_server && verbose && !what_has_changed)
                        rprintf(FINFO, "%s\n", safe_fname(fname));
 
                /* recv file data */
index e9b21cb520a78142bfc76a04aa16a763603ac123..a3cdff407bdce2d97f04262228350a496ee69062 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -20,6 +20,7 @@
 #include "rsync.h"
 
 extern int verbose;
+extern int what_has_changed;
 extern int csum_length;
 extern struct stats stats;
 extern int io_error;
@@ -167,8 +168,8 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                if (verbose > 2)
                        rprintf(FINFO, "send_files(%d, %s)\n", i, fname);
 
-               if (dry_run) {
-                       if (!am_server && verbose) /* log the transfer */
+               if (dry_run) { /* log the transfer */
+                       if (!am_server && verbose && !what_has_changed)
                                rprintf(FINFO, "%s\n", safe_fname(fname2));
                        write_int(f_out, i);
                        continue;
@@ -229,7 +230,8 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                                safe_fname(fname));
                }
 
-               if (!am_server && verbose) /* log the transfer */
+               /* log the transfer */
+               if (!am_server && verbose && !what_has_changed)
                        rprintf(FINFO, "%s\n", safe_fname(fname2));
 
                set_compression(fname);