The formatting commit hook will also try to modify files which have been changed but are not meant to be committed (yet). This will fail the commit, as the hook requires all changes in files it modifies to be staged/commited/stashed.
This seems unreasonable to me - a file that is not meant to be committed does not need to be formatted implicitly and should also not fail the commit. I suggest that the (formatting) commit hook is set to implicitly check only files which are to be committed.