Skip to content

Support msys2 git (fix absolute paths) #175338

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jvasileff
Copy link

msys2 git returns absolute paths like "/c/Users/johnv/...". Git for Windows returns absolute paths like C:\Users\johnv...". To support both (and likely Cygwin git as well), relative paths are requested from git and then made absolute with path.resolve().

This fixes #143165

To test, install both Git for Windows & msys2 git

After installing msys2, install msys2 git with pacman -S git.

Once both gits are installed, vscode git integration should work with either of the following User settings.json configs (vscode restart required when switching):

{
    "git.path": "C:\\Program Files\\Git\\cmd\\git.exe"
    //"git.path": "C:\\msys64\\usr\\bin\\git.exe"
}

msys2 git returns absolute paths like "/c/Users/johnv/...". Git for
Windows returns absolute paths like C:\Users\johnv\...". To support both
(and likely Cygwin git as well), relative paths are requested from git
and then made absolute with path.resolve().
@dpengr
Copy link

dpengr commented Apr 21, 2023

Is this merge request just waiting for review?

@tigerinus
Copy link

Who's the right person for PR approval?

@lszomoru lszomoru added the git GIT issues label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git - Support for Git in Msys2
4 participants