From 0b59d9f00d36a16e4a471a370bb4220c9bba6493 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 May 2025 12:39:20 +0200 Subject: [PATCH] Fix: make format to expand tabs There is similar issue as what was fixed in autopep8 with the initial LFS migration: `git ls-tree` running to gather all files contains files with non-ascii names, such as some non-latin utf-8 files in the tests. Decode the ls-tree using utf-8 for C code format as well. Pull Request: https://projects.blender.org/blender/blender/pulls/138488 --- tools/utils_maintenance/clang_format_paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/utils_maintenance/clang_format_paths.py b/tools/utils_maintenance/clang_format_paths.py index 9aa0580b3bc..9b9d0b04e68 100755 --- a/tools/utils_maintenance/clang_format_paths.py +++ b/tools/utils_maintenance/clang_format_paths.py @@ -96,7 +96,7 @@ def source_files_from_git(paths: Sequence[str], changed_only: bool) -> list[str] else: cmd = ("git", "ls-tree", "-r", "HEAD", *paths, "--name-only", "-z") files = subprocess.check_output(cmd).split(b'\0') - return [f.decode('ascii') for f in files] + return [f.decode('utf-8') for f in files] def convert_tabs_to_spaces(files: Sequence[str]) -> None: