[clang] Add option to format a whole file using git-clang-format (PR #204336)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 01:24:51 PDT 2026
================
@@ -456,11 +461,23 @@ def extract_lines(patch_file):
zero lines of context. The return value is a dict mapping filename to a
list of line `Range`s."""
matches = {}
+
+ if whole_file:
----------------
eoineoineoin wrote:
The script runs `git cat-file` which takes arguments as repository-root relative paths, which is why you can run it from subdirectories. In [ae17aaa](https://github.com/llvm/llvm-project/pull/204336/commits/ae17aaac4a4ebc9b665947d2c254a3b074eb4752), I've taken a slightly different tack, which avoids any line-based filtering, so avoids the need to get these line numbers. Thanks.
https://github.com/llvm/llvm-project/pull/204336
More information about the cfe-commits
mailing list