Based on instructions found at http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/ I have no idea how portable this will be.