I'm looking to automatically add information to certain git commit comments.

For example, I can run a script in the pre-commit phase and detect whether there are any changes to some sort of application configuration templates, and add a comment to the git commit to that effect (say, something like "WARNING! This commit changes configuration templates, you may need to do a full rebuild to get the changes")

Does git provide this through an existing tool/extension/api call?