Steven Morehouse
2007-Feb-28 21:14 UTC
Feature Request: case insensitivity for filter rules
Many of my clients are Windows-based... I can't change that. The are also, unfortunately, not really tech-savvy. In an effort to make things as easy-to-use-as-possible I'm attempting to write an easy how-to for their rsyncing... feedback is that they just aren't getting the case problem. I'll give the exact example: Please exclude all "sys" files from your backup. To do so, enter this line into your exclude file: *.sys Then I get feedback that its not working and it turns out that some of their files are *.SYS or *Sys Ok, easy enough... add two or three lines. But for dozens of rules this gets silly. And *.[Ss][Yy][Ss] is just worse in terms of readability and understandability from a layman. I read though a lot of the cynical "how to post a message" suggestions and I think I can foresee the answer to this question is: "Windows sucks" but I thought I'd ask anyway :) If you can accept that Windows users are valuable too (even if the OS isn't) then perhaps you can recognize that an option to make all EXCLUDE/INCLUDE rules case-insensitive would be extremely popular. I've seen the ignore-case patch, but as far as I can tell that's for source/destination matching. That's a different issue entirely I think. What I'm proposing would only need to take effect on the sending side. In situations where they also need matching against the receiving side, there is the ignore-case patch as well. I've seen exclude case insensitivity get asked in the past (dating back years) but I see very few recognitions of those questions/suggestions and certainly no solutions. Is there any hope of getting this functionality introduced? My first post! So please, accept my thanks! I've searched for this by Google for the past 2-3 years off-and-on hoping it would eventually be introduced... and I'm finally bothering to put in the request. I hope it is received well. Many thanks! - Steven
On 2/28/07, Steven Morehouse <steven@criticalnode.com> wrote:> I've seen the ignore-case patch, but as far as I can tell that's for > source/destination matching. That's a different issue entirely I think. > What I'm proposing would only need to take effect on the sending side. In > situations where they also need matching against the receiving side, there > is the ignore-case patch as well.It looks like --ignore-case was intended to apply to include/exclude rules but is broken: wildmatch_array does not set force_lower_case. The attached metapatch to ignore-case.diff updates offsets and fixes the mistake so that --ignore-case works on include/exclude rules. Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: ignore-case-filters.diff Type: text/x-patch Size: 3515 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20070228/318e4822/ignore-case-filters.bin
Steven Morehouse
2007-Mar-01 17:58 UTC
Feature Request: case insensitivity for filter rules
Thanks Matt! Now the only thing is... I don't know how to patch a patch :( Sorry, I'm not very experienced with building from source. Figuring out how to apply a patch to rsync's source was easy since the patch begins with instructions... but your patch doesn't (that I can decipher anyway). If I understand correctly, your patch patches the patch that patches the src, right? Any tips would be very much appreciated. Thanks. - Steven>> I've seen the ignore-case patch, but as far as I can tell that's for >> source/destination matching. That's a different issue entirely I think. >> What I'm proposing would only need to take effect on the sending side. >> In >> situations where they also need matching against the receiving side, >> there >> is the ignore-case patch as well.>It looks like --ignore-case was intended to apply to include/exclude >rules but is broken: wildmatch_array does not set force_lower_case. >The attached metapatch to ignore-case.diff updates offsets and fixes >the mistake so that --ignore-case works on include/exclude rules.>Matt