[libcxx-commits] [libcxx] [libc++] Add a merge driver that can apply clang-format (PR #73712)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 1 07:07:56 PST 2023


ldionne wrote:

> What's the difference between this and `git clang-format`?

When you install it, this script will be run when you `git merge` or when you `git rebase`, and it will apply these custom rules for resolving merge conflicts. So for example, if you modify a file in a branch before the formatting and then try to rebase across the clang-formatting of the whole codebase, this merge driver will get called by git during the merge process and will mechanically resolve the merge conflict by basically clang-formatting the changes on your branch and then performing the merge as normal.

https://github.com/llvm/llvm-project/pull/73712


More information about the libcxx-commits mailing list