================
@@ -223,6 +228,16 @@ def main():
)
opts = p.parse_args(argv)
+ # When no commits are given explicitly and the pre-commit CI framework's
+ # environment variables are set, use them to define the diff range.
+ if not opts.args and not dash_dash:
+ from_ref = os.environ.get('PRE_COMMIT_FROM_REF')
----------------
HazardyKnusperkeks wrote:
Are these well known and commonly used variables, or are you planning to
introduce them for this script? If the latter, maybe they should refer to
clang-format.
https://github.com/llvm/llvm-project/pull/188816
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits