Requiring another way to set excludes for synchronize mode (rsync) is error prone.
The rsync command has an --exclude switch that can be called several times to exclude different files and folders :
rsync -a --exclude media --exclude storage/ --exclude some/deep/directory
This works for files & directories, so we could just build a list of --exclude switches from the
exclude option form the configuration.
The only pitfall is that it doesn't support the glob syntax: --exclude craft/storage/** or --exclude craft/storage/* doesn't work, you have to use either --exclude craft/storage/ or --exclude craft/storage. To avoid headaches we should advise in the exclude option documentation to use both the glob and the rsync syntax to exclude a directory:
Requiring another way to set excludes for synchronize mode (rsync) is error prone.
The rsync command has an
--exclude
switch that can be called several times to exclude different files and folders :This works for files & directories, so we could just build a list of
--exclude
switches from theexclude
option form the configuration.The only pitfall is that it doesn't support the glob syntax:
--exclude craft/storage/**
or--exclude craft/storage/*
doesn't work, you have to use either--exclude craft/storage/
or--exclude craft/storage
. To avoid headaches we should advise in theexclude
option documentation to use both the glob and the rsync syntax to exclude a directory:Another option would be to rewrite the excludes written in glob syntax when using the synchronize mode but it seems like a bad idea.