How to convert data from .gitignore into list of regexp-es in Perl
Here is my problem. I have some project in git with
.gitignore file. I want to do some work in Perl script with the files that are not listed in
.gitignore (actually I want to test all the files that are commited with the module Test::Whitespaces).
What is the easiest way to parse
.gitignore in Perl and to convert in to the list of regexpes so I can use that list and to pass it to
ignore section of Test::Whitespaces?
One Solution collect form web for “How to convert data from .gitignore into list of regexp-es in Perl”
What about using
glob which can use directly the expressions from .gitignore, and then just subtract the resulting files from the list of all files in a directory?