When performing a --dry-run, output a "(DRY RUN)" reminder on the
authorWayne Davison <wayned@samba.org>
Fri, 9 Nov 2007 04:48:10 +0000 (04:48 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 9 Nov 2007 04:48:10 +0000 (04:48 +0000)
last line of the verbose summary text.

NEWS
main.c

diff --git a/NEWS b/NEWS
index 135932ffa2da0b66183ca291a28dacd193563bcf..e8b87a3a908c045d3e22a5f72455bf4265e5aeb5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Changes since 2.6.9:
       understand the -d option (i.e. it is 2.6.3 or older), you will need to
       either turn off -d (--no-d), or specify  -r --exclude='/*/*'  manually.
 
+    - In --dry-run mode, the last line of the verbose summary text is output
+      with a "(DRY RUN)" suffix to help remind you that no updates were made.
+
   BUG FIXES:
 
     - Fixed the output of -ii when combined with one of the --*-dest options:
diff --git a/main.c b/main.c
index 92b5c44b0d72c69c89a6faac67912e89f2c62b1c..2fc664c8b36320abbc2516d3e7826f9781493826 100644 (file)
--- a/main.c
+++ b/main.c
@@ -272,9 +272,10 @@ static void output_summary(void)
                        "sent %s bytes  received %s bytes  %s bytes/sec\n",
                        human_num(total_written), human_num(total_read),
                        human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2));
-               rprintf(FINFO, "total size is %s  speedup is %.2f\n",
+               rprintf(FINFO, "total size is %s  speedup is %.2f%s\n",
                        human_num(stats.total_size),
-                       (double)stats.total_size / (total_written+total_read));
+                       (double)stats.total_size / (total_written+total_read),
+                       dry_run ? " (DRY RUN)" : "");
        }
 
        fflush(stdout);