[llvm] ed0ca84 - [Github] Add --diff_from_common_commit to code format repro command (#163043)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 12 19:14:14 PDT 2025
Author: Aiden Grossman
Date: 2025-10-12T19:14:10-07:00
New Revision: ed0ca8402cbc58fb2c3d21ad0cf935c2f3534307
URL: https://github.com/llvm/llvm-project/commit/ed0ca8402cbc58fb2c3d21ad0cf935c2f3534307
DIFF: https://github.com/llvm/llvm-project/commit/ed0ca8402cbc58fb2c3d21ad0cf935c2f3534307.diff
LOG: [Github] Add --diff_from_common_commit to code format repro command (#163043)
This ensures that we are not including any branches on main that are not
in the current user's branch in the diff. We can add this to the command
now that --diff_from_common_commit (or at least the fixed version) has
landed in a release (21.1.1).
Added:
Modified:
llvm/utils/git/code-format-helper.py
Removed:
################################################################################
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 6f809c5977c75..e9fd132d8b0e4 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -205,9 +205,10 @@ def _construct_command(self,
diff _expression: list[str] | None):
@property
def instructions(self) -> str:
- # TODO(boomanaiden154): Add --
diff _from_common_commit option when it has
- # landed as in available in a released version.
- return " ".join(self._construct_command(["origin/main", "HEAD"]))
+ return (
+ " ".join(self._construct_command(["origin/main", "HEAD"]))
+ + " --
diff _from_common_commit"
+ )
def should_include_extensionless_file(self, path: str) -> bool:
return path.startswith("libcxx/include")
More information about the llvm-commits
mailing list