puppetlabs/puppetlabs-training-bootstrap — pull request #237 by trlinkin (2014-03-13 20:19:14+00:00)
Title: Add diff-filter to pre-commit hook

Starting in Puppet 3.4.x the `puppet parser validate` command will throw
an error when run against a file that does not exist. The pre-commit
hook used for the fundamentals class runs all modified '.pp' files through
`parser validate` regardless of their state in git. With the new
restrictions in Puppet 3.4.x, this hook will prevent any commit
containing removed '.pp' files from succeeding.

This commit will limit the files being checked by the hook to added and
modified files only. This will allow students to remove '.pp' files.