Skip to content

Commit 976e523

Browse files
[Github] Add --diff_from_common_commit to code format repro command
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).
1 parent 3f46a5c commit 976e523

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/utils/git/code-format-helper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ def _construct_command(self, diff_expression: list[str] | None):
205205

206206
@property
207207
def instructions(self) -> str:
208-
# TODO(boomanaiden154): Add --diff_from_common_commit option when it has
209-
# landed as in available in a released version.
210-
return " ".join(self._construct_command(["origin/main", "HEAD"]))
208+
return (
209+
" ".join(self._construct_command(["origin/main", "HEAD"]))
210+
+ " --diff_from_common_commit"
211+
)
211212

212213
def should_include_extensionless_file(self, path: str) -> bool:
213214
return path.startswith("libcxx/include")

0 commit comments

Comments
 (0)