I am trying to use git clang-format to format all the files in a repo[1], not just a given commit or diff. My first thought was just mark every file as staged and then run the command. Then any files that aren't changed would result in a no-op, but all the files that do have formatting changes would be fixed, staged, and then committed
However, I cannot find a reliable way to force all files to enter the 'staged' state. Even force touching all the files didn't trigger their inclusion.
I have tried variations of git add -a or git add -a -f and that doesn't work.
[1] Yes I could use clang-format directly but depending on versions of clang-format and git clang-format they produce different outputs.