From 879b6ad05c943aa552728d4b27620488ac1d3408 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 9 Nov 2007 04:48:10 +0000 Subject: [PATCH] When performing a --dry-run, output a "(DRY RUN)" reminder on the last line of the verbose summary text. --- NEWS | 3 +++ main.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 135932ff..e8b87a3a 100644 --- 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 92b5c44b..2fc664c8 100644 --- 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); -- 2.34.1