[PATCH] Make progress output show "done" instead of "to-chk".

Matt McCutchen matt at mattmccutchen.net
Wed Oct 22 06:05:43 GMT 2008

In incremental recursion mode, the number of files "to check" can increase (when
new file-list chunks are built) as well as decrease, which I found confusing to
watch.  This patch makes the progress line show the number of files "done"
(which increases monotonically) instead.

I did notice that the last progress line shows "done=N-1/N" instead of
"done=N/N"; that is perhaps unsettling but not really wrong.
I'm sending this patch to the main rsync list rather than
rsync-patches at mattmccutchen.net because others might want to express
opinions on it.


 progress.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/progress.c b/progress.c
index 25be374..7309a5d 100644
--- a/progress.c
+++ b/progress.c
@@ -72,9 +72,9 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now,
 	if (is_last) {
 		int len = snprintf(eol, sizeof eol,
-			" (xfr#%d, to-chk=%d/%d)\n",
+			" (xfr#%d, done=%d/%d)\n",
-			stats.num_files - current_file_index - 1,
+			current_file_index,
 		if (INFO_GTE(PROGRESS, 2)) {
 			static int last_len = 0;

More information about the rsync mailing list