[patch] improved ignore pattern matching (#57637)

Kent Gibson warthog618 at gmail.com
Mon Nov 13 14:38:33 GMT 2006


Attached is a patch which replaces the old fnmatch based ignore pattern
matching with a faster and more accurate globbing engine originally
written by Jan Hudec, and massaged a bit by me.

Bug 57637 describes just one or two of the problems with the old fnmatch
approach.
The goal of this patch is to squash those and any related bugs in one hit.
Unlike the fnmatch version, this version is fully compliant with shell
globbing.
It also supports a 'RE:<regex>' extension pattern for those seriously
hard to reach places.

Unlike Jan's original patch it does not support '**' or '***' extensions
because I'm not satisfied that there is a consensus as to which form of
globbing extensions we should support, and I don't want to go
introducing a future backwards compatibility problem.

Speaking of backwards compatibility, this patch is not.  Any ignore
patterns making use of broken fnmatch behaviour (e.g. in fnmatch '*foo'
will match '.foo') will no longer match.

Cheers,
Kent.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lp57637.patch
Type: text/x-patch
Size: 32096 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061113/611ad50c/attachment.bin 


More information about the bazaar mailing list