Q & A
Why are the results of clang-format and git-clang-format different?
References
- Why are the results of
clang-formatandgit-clang-formatdifferent? on Stack Overflow. - Git Intergration on LLVM Clang.
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.