[clang] c31bc7b - [clang-format] Handle tabs in file path for git-clang-format
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 18 12:56:55 PST 2023
Author: Michael Kirk
Date: 2023-02-18T12:56:46-08:00
New Revision: c31bc7bdf8108fae490585763bf69a1b51327954
URL: https://github.com/llvm/llvm-project/commit/c31bc7bdf8108fae490585763bf69a1b51327954
DIFF: https://github.com/llvm/llvm-project/commit/c31bc7bdf8108fae490585763bf69a1b51327954.diff
LOG: [clang-format] Handle tabs in file path for git-clang-format
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 054978c3dbdf3..695545d9e3255 100755
--- a/clang/tools/clang-format/git-clang-format
+++ b/clang/tools/clang-format/git-clang-format
@@ -347,7 +347,7 @@ def extract_lines(patch_file):
line = convert_string(line)
match = re.search(r'^\+\+\+\ [^/]+/(.*)', line)
if match:
- filename = match.group(1).rstrip('\r\n')
+ filename = match.group(1).rstrip('\r\n\t')
match = re.search(r'^@@ -[0-9,]+ \+(\d+)(,(\d+))?', line)
if match:
start_line = int(match.group(1))
More information about the cfe-commits
mailing list