Hi,
When using --max-delete=NUM, NUM + 1 files get deleted.
Test it by doing this:
# mkdir src
# mkdir dest
# cd src
# touch 1 2 3 4 5
# cd ..
# rsync -avu  src/ dest
# cd src
# rm 1 2
# cd ..
( Here i try to sync src and dest, but only delete one file from dest
at the time. This would prevent an accidental rm in src from
propagating to dest. )
# rsync --delete -avun --max-delete=1 src/ dest
Output:
    root@computer:/tmp# ./rsync --delete -avun --max-delete=1 src/ dest
    building file list ... done
    deleting 2
    deleting 1
    sent 81 bytes  received 20 bytes  202.00 bytes/sec
    total size is 0  speedup is 0.00
It deletes 2 files while --max-delete=1 was specified.
I think it has something to do with deletion_count in delete_files(receiver.c).
Bye,
Laurens