The pre-commit hook fails on wrongly formatted changes with suggestion to run git clang-format
to resolve the problems.
I (brano) am using this hook for a while. I don't think about formatting any more. I am often lazy to format the code correctly when coding. Formatting is offloaded to the tool.