[clang] [clang-format] Fix a bug in `git-clang-format --binary` (PR #74176)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 1 19:27:57 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
<details>
<summary>Changes</summary>
Fixed #<!-- -->74165.
---
Full diff: https://github.com/llvm/llvm-project/pull/74176.diff
1 Files Affected:
- (modified) clang/tools/clang-format/git-clang-format (+1)
``````````diff
diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format
index 0f33b5339ec14cb..6e827e17b4ee291 100755
--- a/clang/tools/clang-format/git-clang-format
+++ b/clang/tools/clang-format/git-clang-format
@@ -153,6 +153,7 @@ def main():
else:
if len(commits) > 2:
die('at most two commits allowed; %d given' % len(commits))
+ opts.binary=os.path.abspath(opts.binary)
changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged)
if opts.verbose >= 1:
ignored_files = set(changed_lines)
``````````
</details>
https://github.com/llvm/llvm-project/pull/74176
More information about the cfe-commits
mailing list