In my case, the Problem was a pre-commit-hook script (checking that files don't contain TAB characters), which crashes when it rejects multiple files. Fixing the committed files to pass the pre-commit checks fixed the error.
Strangely, the hook works well and produces the correct E165001
error for a TAB
in a single file and only fails when multiple files violate its rules; but this is another issue - as is the fact that a pre-commit script can crash the whole commit with a very confusing error message.