[patch] improved ignore pattern matching (#57637)
Kent Gibson
warthog618 at gmail.com
Mon Nov 27 06:16:11 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jari Aalto wrote:
>> Not supporting whitespace in regexes would be weird. In regexes
>> whitespace is normally matched verbatim - if that's how you want
>> to use it. Or you can use the special character groups as you
>> suggest. Leave it to the user.
>
> Sure, I was just think that someone wrotes:
>
> <SPACE><TAB>
>
> and the other person loads that to editor, which converts it to
> following upon save:
>
> <SPACE><N spaces>
>
> Provided that the editor has setting "always store files without
> tabs, using spaces only".
>
> Forcing people to use \s always will prevent mistakes like these at
> the source. It is also hard to see "live" what character are
> there:
>
> <SPACE><TAB>: perceived as? <SPACE><N spaces> or <TAB><SPACE> or
> ...
>
> Practically unvisible unless you turn on some magical "show tabs"
> mode.
>
I agree that that scenario is possible, but I don't think hobbling the
regexes is the solution.
Given we are talking about filenames, I would expect the most common
whitespace to be a single space between words. I wouldn't want to
force the user have to translate a space to '\s' for all those cases
just to save the relative few that use '\t' in filenames from falling
into the trap you describe.
Cheers,
Kent.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFaoKqgoxTFTi1P8QRAqnKAKDCM7gWQOTVxW+VRgIm8VswlWjsmQCgiTDz
laQRFbMFf+cgpp0Q/gvn+VA=
=shqc
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list