Hi I use the compare dest option to calculate a residual difference directory of files.. this has been very successful. I noticed when running on a box with version 3.0.9 of rsync that this feature was giving me different results to before. Re-created on my Mac thus: Note: The compare-dest test passed for both builds phillyair:rsync philipc$ ls rsync-2.6.9 rsync-3.0.9 phillyair:rsync philipc$ mkdir -p compare/src1 compare/src2 phillyair:rsync philipc$ cd compare/ phillyair:compare philipc$ touch src1/file1 src1/file2 phillyair:compare philipc$ touch src2/file1 src2/file2 src2/file3 phillyair:compare philipc$ ../rsync-2.6.9/rsync -av --size-only --compare-dest=../src1/ ./src2/ dest1 building file list ... done created directory dest1 ./ file3 sent 165 bytes received 60 bytes 450.00 bytes/sec total size is 0 speedup is 0.00 phillyair:compare philipc$ rm -fr dest1 phillyair:compare philipc$ ../rsync-3.0.9/rsync -av --size-only --compare-dest=../src1/ ./src2/ dest1 sending incremental file list created directory dest1 ./ file1 file2 file3 sent 118 bytes received 40 bytes 316.00 bytes/sec total size is 0 speedup is 0.00 I would expect just the difference to be in the dest directory as is the case for rsync-2.6.9.
There have been a lot of bug fixes in compare dest over time, including proper determination of files not really being equal due to things like permission differences, xattr differences, etc. (All depending on what you tell rsync to preserve.) I'd imagine this is one of the instances that earlier rsyncs got wrong. e.g., in your test case, you'd need to specify --no-t if you don't want a different mtime to cause the files to be unequal.