Yet another filter question
Karl O. Pinc
kop at meme.com
Thu May 5 02:26:26 UTC 2016
On Wed, 4 May 2016 21:09:44 -0400
Kevin Korb <kmk at sanitarium.net> wrote:
> That wording from the man page makes almost no sense without the
> examples directly after it (and I have read it many times and know
> what it is saying).
Makes sense to me. The only thing I'd change is to use "in a depth
first fasion" instead of "from the top down", "depth first" (v.s.
"breadth first") being the standard idiom when talking about
this tree traversal strategy. It also matches up with some
of the vocabulary (e.g. "deeper") used later in the paragraph.
Er, ok. It could also say "component" instead of "subcomponent",
in the first instance. And "to the full name of each node in the
filesystem's tree" instead of "to each subcomponents full name",
in the second instance. And eliminate "the subcomponents" in the
Patch appended. (Which does not perfectly match my comments
> On 05/04/2016 09:03 PM, Wayne Davison wrote:
> > 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./
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
diff --git a/rsync.yo b/rsync.yo
index 0ec5e55..3f742ab 100644
@@ -2830,14 +2830,16 @@ itemization(
Note that, when using the bf(--recursive) (bf(-r)) option (which is implied by
-bf(-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
+bf(-a)), every component of every pathname is visited
+in a depth-first fashion. In this way
+include/exclude patterns are applied recursively to the full name of each
+node in the filesystem's tree.
+(E.g. to include "/foo/bar/baz", "/foo" and
"/foo/bar" must not be excluded).
-The exclude patterns actually short-circuit the directory traversal stage
+The exclude patterns short-circuit the directory traversal stage
when rsync finds the files to send. If a pattern excludes a particular
-parent directory, it can render a deeper include pattern ineffectual
-because rsync did not descend through that excluded section of the
+parent directory this can render a deeper include pattern ineffectual
+because rsync does not descend through the excluded section of the
hierarchy. This is particularly important when using a trailing '*' rule.
For instance, this won't work:
More information about the rsync