New wildmatch code in CVS
Wayne Davison
wayned at samba.org
Sun Jul 6 09:12:15 EST 2003
If you've been watching CVS, you may have noticed that I checked in some
new files named wildmatch.c and wildmatch.h. This code implements the
shell-style wildcard matching with rsync's extension that "**" matches a
"/" but "*" and "?" does not. I have also checked in a new test module
which has allowed me to test a few things on all the machines in our
build farm. One thing I discovered is that the various fnmatch() calls
all seem to handle the character-class boundary cases in conflicting
ways (things like "[]-]"). So, one benefit for rsync of switching from
fnmatch to wildmatch will be to make the callers of this function behave
consistently on all platforms (which primarily affects the exclude
code).
I've currently got the wildmatch code fully implemented and optimized,
and it is looking good so far. Use of it in rsync itself has not yet
been checked into CVS, but I'm using it on my systems.
Anyone have any concerns or comments on switching over to this new code?
Also, if anyone has some good test cases for wildcard matching, it would
be good to make the wildmatch test suite even more comprehensive than it
already is.
..wayne..
More information about the rsync
mailing list