Feature request: two layers of exclude/include patterns

Brady Chen chenchp at gmail.com
Thu Aug 14 06:55:47 GMT 2008


Feature request: two layers of exclude/include patterns

=== Logic ===
there are two (or more than one) lists of filters. only when check which
file should be included, it go through two layers.

if (file included in layer1_filer && file included in layer2_filter) {
    //it's included
} else {
   // excluded.
}


=== Example ===
$cat include_file_layer1
+ /dir1/**
+ /dir2/**
- **

$cat include_file_layer2
+ *.o
- **

$rsync --include-from include_file_layer1 --include-from-2
include_file_layer2 src/ host at des/

then only .o fiiles under /dir1/ and /dir2/ will be synced.

===Benefit===
1. with layered filters, it's easier to define the sync policy by more than
one people cooperatively.
2. with layered filters, it's easier to define complex policy. user can
simply think about one policy for one layer
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list