[clang] [clang-format] convert path to Windows path if user is using a MSYS2 shell (PR #111526)

Gary Wang via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 00:54:25 PDT 2024


BLumia wrote:

> Isn't this a Python/MSYS2 bug?

I'm not sure if it should be considered as a MSYS2 bug.

IMO it should be expected that `run('git', 'rev-parse', '--show-toplevel')` will return an UNIX path since it will call MSYS2's git. And according to [their documentation](https://www.msys2.org/docs/python/), it also seems it's intended to let `python` accept Windows-style path but with MSYS2's separator (see `python -m site`'s output under MSYS2 for example).

> Is it related to https://github.com/llvm/llvm-project/pull/114078?

Sort of, but https://github.com/llvm/llvm-project/pull/114078 won't fix this issue since MSYS2's shell will invoke `git-clang-format` instead of `git-clang-format.bat`

https://github.com/llvm/llvm-project/pull/111526


More information about the cfe-commits mailing list