Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make hg ignore filter case insensitive

I am trying to set up an hg repo for an old project on Windows. I want to ignore images, binaries, and some 3rd party source files, however these files contains different casing for the same patterns, for example, .jpg and .JPG, abc_sth and ABC_sth.

I learned that hgignore is case sensitive, do I have to list the different cases all in the hgignore file, or are there options that I can turn on to make the ignore filter case insensitive?

like image 913
Paul Chen Avatar asked Jul 06 '13 14:07

Paul Chen


1 Answers

Finally I get enough rep to post my own answer.

Use regex syntax, and prefix (?i). So the pattern for the example I used here can be

syntax: regexp
(?i)\.jpg
(?i)abc_
like image 67
Paul Chen Avatar answered Dec 07 '22 08:12

Paul Chen