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

2024-10-30 Thread Gary Wang via cfe-commits
BLumia wrote: > > Isn't this a Python/MSYS2 bug? > > I'm not sure if it should be considered as a MSYS2 bug. I also created a discussion thread, see: https://github.com/msys2/MSYS2-packages/discussions/4982 https://github.com/llvm/llvm-project/pull/111526

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

2024-10-30 Thread Gary Wang via cfe-commits
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.

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

2024-10-28 Thread Gary Wang via cfe-commits
BLumia wrote: @HazardyKnusperkeks @owenca @cor3ntin sorry for the ping, kindly asking for a review. Thanks in advance! https://github.com/llvm/llvm-project/pull/111526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-10-19 Thread Gary Wang via cfe-commits
BLumia wrote: Ping https://github.com/llvm/llvm-project/pull/111526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-16 Thread Gary Wang via cfe-commits
BLumia wrote: @mydeveloperday any update on this? Do I still need to create a new issue in this repo or provide any additional information? https://github.com/llvm/llvm-project/pull/111526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

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

2024-10-08 Thread Gary Wang via cfe-commits
BLumia wrote: > I personally use Cygwin and it's git understands unix paths is that not the > case for msys2 Git can understand (and will return a) unix path, but it seems MSYS2's python won't accept unix path. It fails at `os.chdir(toplevel)`, and `toplevel` is a unix path. > are you mixing

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

2024-10-08 Thread Gary Wang via cfe-commits
https://github.com/BLumia created https://github.com/llvm/llvm-project/pull/111526 Currently, we simply rely on the result of `git rev-parse --show-toplevel` in `cd_to_toplevel()`, which when using MSYS2 shell under Windows, can result getting a UNIX path instead of Windows path, and `os.chdir