3.1, including the latest version, produces bogus ---stats output:
% rsync -r --stats . > /tmp/3.1-n
% tail -n 17 /tmp/3.1-n
Number of files: 3,159 (reg: 2,984, dir: 173, link: 2)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 0
Total file size: -6,417,895,484,864,819,269 bytes
*************************************************
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 70,825
Total bytes received: 302,120
sent 70,825 bytes received 302,120 bytes 149,178.00 bytes/sec
total size is -6,417,895,484,864,819,269 speedup is -17,208,691,589,550.25
***************************************************************************
3.0.6 gets it right:
Number of files: 3159
Number of files transferred: 0
Total file size: 327945064379 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 69034
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 69219
Total bytes received: 184
sent 69219 bytes received 184 bytes 138806.00 bytes/sec
total size is 327945064379 speedup is 4725228.94
BTW, why aren't these fields
struct stats {
int64 total_size;
int64 total_transferred_size;
int64 total_written;
int64 total_read;
int64 literal_data;
int64 matched_data;
of type size_t?