[libcxx-commits] [libcxx] [libc++] Add a merge driver that can apply clang-format (PR #73712)
Bruno De Fraine via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 1 07:50:41 PST 2023
================
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# This script can be installed in .git/config to allow rebasing old patches across
+# libc++'s clang-format of the whole tree. Most contributors should not require that
+# since they don't have many pre-clang-format patches lying around. This script is to
+# make it easier for contributors that do have such patches.
+#
+# The script is installed by running the following from the root of your repository:
+#
+# $ git config merge.libcxx-reformat.name "Run clang-format when rebasing libc++ patches"
+# $ git config merge.libcxx-reformat.driver "libcxx/utils/clang-format-merge-driver.sh %O %A %B %P"
+# $ git config merge.libcxx-reformat.recursive binary
----------------
brunodf-snps wrote:
It is probably not very important, since the LLVM repository has a linear history, and people will just use this to rebase a linear chain of commits on the new branch head, so there will normally never be multiple common ancestors. But if we don't understand what the impact is, it is not bad to leave this at the default (the documentation on "recursive" explains "When left unspecified, the driver itself is used for both internal merge and the final merge.")
https://github.com/llvm/llvm-project/pull/73712
More information about the libcxx-commits
mailing list