[clang] 2a3f119 - [clang-format] Fix a bug in `git-clang-format --binary` (#74176)

via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 3 02:07:11 PST 2023


Author: Owen Pan
Date: 2023-12-03T02:07:07-08:00
New Revision: 2a3f1195d61e9fc1837926aa394ea73cc6f90bee

URL: https://github.com/llvm/llvm-project/commit/2a3f1195d61e9fc1837926aa394ea73cc6f90bee
DIFF: https://github.com/llvm/llvm-project/commit/2a3f1195d61e9fc1837926aa394ea73cc6f90bee.diff

LOG: [clang-format] Fix a bug in `git-clang-format --binary` (#74176)

Fixed #74165.

Added: 
    

Modified: 
    clang/tools/clang-format/git-clang-format

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format
index 0f33b5339ec14..6e827e17b4ee2 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)


        


More information about the cfe-commits mailing list