It is a little confusing but in order to have an exclude dir merge
filter do both things (prevent transfer and prevent deletion) then it
needs to be on both ends of the transfer. The file on each end only has
partial effect on what rsync does.
Think of it like a file you (as a regular user) can
Hello,
I want to avoid transferring a file which is present both on the source
tree and on the target tree when calling rsync with -a --delete.
mkdir -pv src/ dst/
echo file1 > src/file
echo file2 > dst/file
rsync -navi --delete --exclude file src/ dst/
works as expected. The file is not