Yet another filter question

Wayne Davison wayned at samba.org
Thu May 5 01:03:23 UTC 2016


On Tue, May 3, 2016 at 1:07 PM, Christoph Biedl <cbiedl at gmx.de> wrote:

>   + *.git/.git/*
>   - *.git/
>

>From the man page near the start of the "INCLUDE/EXCLUDE PATTERN RULES"
section:

*Note that, when using the --recursive (-r) option (which is implied by
> -a), every subcomponent of every path is visited from the top down, so
> include/exclude patterns get applied recursively to each subcomponent’s
> full name (e.g. to include "/foo/bar/baz" the subcomponents "/foo" and
> "/foo/bar" must not be excluded). The exclude patterns actually
> short-circuit the directory traversal stage when rsync finds the files to
> send.*


Thus, your latter exclude prevents the first include from ever seeing any
data that it could match. You'd need to use something more like this:

+ *.git/.git/
- *.git/*


..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20160504/01c86246/attachment.html>


More information about the rsync mailing list