DO NOT REPLY [Bug 7321] New: Extend "p" filter modifier to make source dirs prunable

samba-bugs at samba-bugs at
Fri Apr 2 12:42:50 MDT 2010

           Summary: Extend "p" filter modifier to make source dirs prunable
           Product: rsync
           Version: 3.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: matt at
         QAContact: rsync-qa at

It would be very useful to have a way to traverse source dirs but only add them
to the file list if a descendant is added to the file list.  --prune-empty-dirs
can do this, but it has two significant disadvantages:

- File-list entries are sent to the receiver even if they will later be pruned.
 This wastes bandwidth and unnecessarily leaks potentially private data.

- The single set of receiver-side filters is used for two unrelated tasks:
protecting destination dirs from deletion and protecting source dirs from
pruning.  It should be possible to specify two independent sets of filters. 
This came up once on the list:

So I'd like to propose a new implementation of source pruning. 
(--prune-empty-dirs would remain for compatibility, but the man page would
encourage users to move to the new implementation.)  The "p" filter modifier,
currently used to mark protect filters perishable, would gain a second meaning
to mark "show" filters prunable.  The analogue to the time-honored
"--include='*/' --exclude='*' --prune-empty-dirs" combination would be
"--filter='+p */' --exclude='*'" .

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list