Fixed pre-commit hook bug when no files have changed