Trailing whitespace hook checks more files then it intends to

git-whitespace-hook has a regexp to identify the files to check for trailing whitespace:

TRAILING_WHITESPACE_DEFAULT='.*(dune.module|README|README.SVN|COPYING|README.md|LICENSE.md|CONTRIBUTING.md|INSTALL|TODO|\.pc\.in)$' 

This will match

  • README (intended)
  • external/imported/project/README (probably not intended)
  • bin/generate-README (probably not intended)
  • INSTALL (intended)
  • TAG_AUTOINSTALL (probably not intended)
  • dune.module (intended)
  • external/myproject-for-dune/module (probably not intended)

In addition, because of the way this regexp is passed to perl later, there will be interesting effects when you try to match /, the path separator.