Using .ignore file in find

Grigorii Sokolik <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <CADjZRiT7UZ8Tx9qrieHK2esUEG-p0VsdznizjqsW6LgYGDH8yg@mail.gmail.com>
Dear findutils maintainers team!

In the software development world there is a widespread practice of using
ignore files. Examples are:
  - .gitignore
  - .dockerignore
  - .clang-format-ignore
  - ...
All of them have the same syntax and the same logic. It would be super
great if it would be possible to use the same syntax file in find for
listing ignored files or unignore files

Use cases:

# list all ignored files
find . -type f -name .gitignore | sed
's/\(.*\.gitignore\)/--match-patterns \1/' | xargs find . -type f

# list all files not violating the rules
find . -type f -name .my-fancy-system-ignore | sed
's/\(.*\.my-fancy-system-ignore\)/--ignore-patterns \1/' | xargs find . |
xargs add_file_to_my_fancy_system_context

What should I do to make it possible? I could try to implement it myself,
but I would like to discuss this feature first.

-- 

Thanks!
Kind regards,
Grigorii!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.