Skip to content

msys2 path patches to make git functions work at least #3495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shikorido
Copy link

@shikorido shikorido commented Jul 8, 2025

The patch assumes that plenary.nvim has the changes I made in the corresponded PR. At least for plenary.utils module and path conversions in internal logic.

As stated in the plenary's PR the msys2 integration is very fragile so I left all my comments and test notifies for further debugging.

Description

I want to make Plenary and Telescope compliant with msys2 (and windows indirectly).
The good looking changes can be hard to achieve cause msys2 returns posix-style paths but can use Windows-style
and in the same time neovim from clang64 repo returns windows-style paths but can not use posix-style.

The main idea would be a complete dependence on Plenary/Nvim path work.
But now I want to share how the fix-up changes look like in the current version (w/o breaking changes).

The fixes are mainly for git-related functions. I wanted to have it working and I achieved that with dirty changes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The issue is more likely to be long-term, so I will leave the reproduction steps for later
if someone ever wants to reproduce it and doesn't have msys2+nvim configured yet.

  • Git bcommits with working diff preview and checkouting (bcommits range was not tested).
  • Git branches with working commits history and checkouting.
  • Git commits with working diff preview and checkouting.
  • Git files with working preview and files selecting.
  • Git stash with working diff preview and stash application.
  • Git status with working diff/file preview and designations of file status.

Configuration:

  • WezTerm: 20240203-110809-5046fc22 (if makes any sense)
  • Zsh: 5.9 (x86_64-pc-msys) (maybe causes {} expansion)
  • Bash: GNU bash, version 5.2.37(2)-release (x86_64-pc-cygwin) (setted as nvim shell)
  • Neovim version (nvim --version): NVIM v0.11.1 from msys2's clang64 repo
  • Operating system and version: Windows 10 Pro 22H2 19045.5854

Checklist:

  • Deep-draft
  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

The patch assumes that `plenary.nvim` has the changes I made
[in the corresponded PR](nvim-lua/plenary.nvim#663). At least for `plenary.utils` module usage
and bruteforce paths conversions in internal logic.

As stated in the `plenary`'s PR the msys2 integration is very fragile
so I left all my comments and test notifies for further debugging.
@shikorido shikorido force-pushed the msys2-bruteforce-path-support branch from 1e6feb8 to 3a884fb Compare July 8, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant