fix: output Unix-style paths for git diffs on Win (#25763)
This commit is contained in:
parent
818751ff87
commit
bbdca48cdb
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,7 @@ import fnmatch
|
||||||
import io
|
import io
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
|
import posixpath
|
||||||
import signal
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -135,6 +136,8 @@ def run_clang_format_diff(args, file_name):
|
||||||
proc.returncode, file_name), errs)
|
proc.returncode, file_name), errs)
|
||||||
if args.fix:
|
if args.fix:
|
||||||
return None, errs
|
return None, errs
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
file_name = file_name.replace(os.sep, posixpath.sep)
|
||||||
return make_diff(file_name, original, outs), errs
|
return make_diff(file_name, original, outs), errs
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue