Skip to content

Q & A ​

Why are the results of clang-format and git-clang-format different? ​

git-clang-format only formats changes. clang-format formats the whole document.

The script clang/tools/clang-format/git-clang-format can be used to format just the lines touched in git commits.