[clang-format] Handle tabs in file path for git-clang-format

This commit is contained in:
Michael Kirk 2023-02-18 12:50:44 -08:00 committed by Owen Pan
parent a53d940cee
commit c31bc7bdf8

View File

@ -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))