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?

  • Strange “Error.” that shows up after every commit
  • git fsck reporting “sha1 mismatch”
  • Git merge two remote branches in one repository
  • How to move commits on top of master if HEAD is detached?
  • How do I convince Xcode and Git that my Asset Catalog has been updated?
  • Git repositories and post-receive hooks on remote servers
  • VSCode shortcut to cycle through changed (git) blocks in current file
  • .git/info/exclude replacement for git submodule?
  • Using version control (Git) on a MySQL database
  • Git: How can I prevent a specific commit from being merged into another branch?
  • GIT get the commit hash prior to a specific commit
  • Get a token by Github API
  • 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?

    Git Baby is a git and github fan, let's start git clone.