avar / app-inotify-hookable

The App::Inotify::Hookable CPAN module
4 stars 2 forks source link

Support ignoring based on .gitignore files #6

Open RCoeurjoly opened 4 years ago

RCoeurjoly commented 4 years ago

The feature consists of adding a new flag --parse-gitignore. When this flag is passed, all lines are included in the $self->ignore_paths array, maybe taking into account the path to the .gitignore (prepending it to each line).

The next step would be finding recursively all .gitignore files and doing the same as before.

There is already a Perl package that parses the .gitignore file: https://metacpan.org/pod/distribution/Parse-Gitignore/lib/Parse/Gitignore.pod

My skill in Perl is null, so I post this as a feature request while I read the code. If I find how to do it myself I will do a PR.

rkitover commented 4 years ago

@avar any objections to me implementing this?